Witam. Mam taki kod TypeScript:
class ExampleFunctions {
msg = "Hello world";
showMsg(): void {
console.log(this.msg);
}
hello1(message: string): void {
console.log(message);
}
}
var example = new ExampleFunctions();
example.showMsg();
example.hello1("Eluwina");
Wyrzuca mi błąd, 4 linijka. Chrome: script.ts:4 Uncaught SyntaxError: Unexpected token ':'
Firefox: Uncaught SyntaxError: missing { before function body
Czemu tak się dzieje? :/