↧
Answer by Amid for How to import my own class into Nodejs
You should remove the export module part and leave just:export class MyClass { Name: string; greet() { return "Hello world!"; } }File is already a module in typescript.And then:var test=new...
View ArticleHow to import my own class into Nodejs
I create simple class (mymodule.ts): export module MyModule {export class MyClass { Name: string; greet() { return "Hello world!"; } }}So, i have server.ts class (nodejs):import http =...
View Article