4

Will arrow functions written in Typescript for Angular2 work in IE 11? I've read that arrow functions in javascript aren't supported in IE 11 but wasn't sure if this meant they would also not be supported in Typescript.

2 Answers 2

8

TypeScript code gets compiled to JavaScript, and you can specify to which JavaScript version you'd like it to compile to. Whether the generated code will work, depends on the compilation target you have specified in tsconfig.json file or through command-line options for tsc. As long as you have ES5 as a target, the compiled code will work in IE11.

To read more about Compiler Options, see official TypeScript handbook.

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

Comments

1

Arrow function in ES 6 specifications are supported in the below list of browsers,

enter image description here

Source

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.