Quantcast
Channel: How to import my own class into Nodejs - Stack Overflow
Browsing latest articles
Browse All 2 View Live

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 Article



How 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
Browsing latest articles
Browse All 2 View Live




Latest Images

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