Answer the question
In order to leave comments, you need to log in
How to use arguments in TypeScript?
Decided to use TypeScript in the project. The first time I work with him and immediately stumbled upon such a problem.
We create a class:
class AnonimChat {
constructor(private $, private tpl) {
}
console(...params: any[]) {
console[params[0]](params.slice(1));
}
}
var AChat = new AnonimChat(()=>1, ()=>1);
AChat.console("log", "first", "second", 1, []);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question