0

When i run ts-node, it throw me these error

src/api/role.ts:2:58 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead?
2 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                           ~~~~~~~~~~~~~
src/api/role.ts:9:64 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead?
9 var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {

But all the lines mentioned in the error can't be found in my code. I tried to run tsc, it did not show those errors. All these error only happens when i use ts-node.

Tan Vee Han
  • 337
  • 4
  • 12

1 Answers1

0

i changed my _moduleAliases in package.json to refer to built script. and it work, but for every change in my script i need to run tsc.

Tan Vee Han
  • 337
  • 4
  • 12