I am creating a node express application. For my use case, I have a 1.ts file with a class as:
export class blah {
constructor(props) {
}
tt() {
console.log('logging function');
}
}
in my 2.js file i am importing as
const blah = require('./1')
var b = new blah.blah()
console.log(b.tt())
But nothing in console.function is not being called.
How do i fix this problem. tsconfig.json file content
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"exclude": [
"node_modules"
]
}
tsc 1.ts?tsconfig.jsonfile?