Suppose you have the following:
class Foo {
public bar(): void { baz(); }
}
Where baz
is the function which exists in JavaScript code loaded into this page, but which does not exist in this project. How do I hint TypeScript compiler that the function just will be there?
(It's still too early to answer my own question, but I already figured that out, or so it seems):
declare function baz():void;
before the class definition should do the trick.