1

We are converting the existing Javascript to Typescript.

When the Typescript code is compiled to Javascript, there is __extends method call. But there is NO function definition for __extends. So, getting the error as __extends as undefined. I believe __extends will be created in the Javascript file.

Is there any configuration change, that we should do inorder to get the __extends function in the compiled Javascript ?

Please advice and throw some help.

tsconfig.json

{
  "compilerOptions": { 
    "target": "es5", 
    "outDir": "../app/scripts/",
    "rootDir": "./", 
    "watch": false, 
    "removeComments": true, 
    "module": "amd", 
    "noImplicitAny": true,
    "noEmitHelpers": true
  }
}
2
  • Can you post your tsconfig.json file? Commented Apr 17, 2016 at 0:54
  • { "compilerOptions": { "target": "es5", "outDir": "../app/scripts/", "rootDir": "./", "watch": false, "removeComments": true, "module": "amd", "noImplicitAny": true, "noEmitHelpers": true } } Commented Apr 17, 2016 at 0:55

1 Answer 1

1

Based on this TS issue either remove the noEmitHelpers option from tsconfig.json file or provide __extends method yourself.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.