module Archives - wiki

Node js export and import

In the first part I am explaining how to do export and import using js.

here is my sample module ‘myutile.js

we can import all from the above module

output:

And also we can import only the specific function/data . for example I need to import only the myMethod2() and myData from the module

output:

 


Using Typescript

sample module ‘myutile.js’

Importing all

output

Importing all

output

Importing required

 

 

 

1 Like
By bm on November 14, 2018 | NodeJs | A comment?
Tags: , , ,