Quantcast
Channel: How to import my own class into Nodejs - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Amid for How to import my own class into Nodejs

$
0
0

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 my.MyClass();

Hope this helps.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>