Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

chore(examples): Fix TSC issues with exampleTypescript #4132

Merged
merged 1 commit into from
Mar 4, 2017

Conversation

NickTomlin
Copy link
Contributor

@NickTomlin NickTomlin commented Mar 4, 2017

This makes some small updates to TS config and TS related deps to allow compilation with the version of TS installed by the example.

I'm still familiarizing myself with the TS ecosystem and the way things should be done, so please let me know if there's a convention that I've missed here.

Issues Resolved

Jasmine typing issues (see DefinitelyTyped/DefinitelyTyped#14569 for more details), Pinning the jasmine typings prevents the following compilation error:

typescript-example-updates ᎒ npm run tsc

> example-typescript@1.0.0 tsc /Users/ntomlin/workspace/protractor/exampleTypescript
> tsc

node_modules/@types/jasmine/index.d.ts(39,52): error TS1005: '=' expected.

npm ERR! Darwin 16.4.0

We could also resolve this by pinning the typescript depedency of the example to ^2.2.0

Missing Promise definitions. Updating the target to es6 (which seems sane to me since we are now node 6+) prevents issues with Promise typings:

> example-typescript@1.0.0 tsc /Users/ntomlin/workspace/protractor/exampleTypescript
> tsc

node_modules/@types/jasminewd2/index.d.ts(9,60): error TS2304: Cannot find name 'Promise'.
node_modules/@types/jasminewd2/index.d.ts(10,61): error TS2304: Cannot find name 'Promise'.
node_modules/@types/jasminewd2/index.d.ts(11,61): error TS2304: Cannot find name 'Promise'.
node_modules/@types/jasminewd2/index.d.ts(12,43): error TS2304: Cannot find name 'Promise'.
node_modules/@types/jasminewd2/index.d.ts(13,42): error TS2304: Cannot find name 'Promise'.
node_modules/@types/jasminewd2/index.d.ts(14,42): error TS2304: Cannot find name 'Promise'.
node_modules/@types/jasminewd2/index.d.ts(15,41): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts(43,43): error TS2304: Cannot find name 'Promise'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants