I'm new to TypeScript and I'm having some trouble compiling es6 code.
I have a .ts file:
let a: number[] = [1,34,5,5,34,3];
console.log(a.find(no => no == 5));
When I run tsc --module es6 --target es2015 src/test.ts
it compiles fine, however tsc --module es6 --target es5 src/test.ts
doesn't seem to work? I would like to target es5, but doing so gives me the error:
Property 'find' does not exist on type 'number[]'.
Can't TypeScript compile to es5, or will I need to run babel on top of the TypeScript compiler?