Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Upgrade to typescript 2.4 and ts-loader 2.2.1 #94

Merged
merged 2 commits into from
Jul 11, 2017

Conversation

frederickfogerty
Copy link
Contributor

@frederickfogerty frederickfogerty commented Jun 30, 2017

Ts-loader version 2.2.1 is the minimum version required to work on typescript 2.4.1, see TypeStrong/ts-loader#566 for more details.


I'm not sure how I can test or verify my changes. Are there any tests I can run, or anyway to run it in a CRA project?

@wmonk
Copy link
Owner

wmonk commented Jun 30, 2017

@frederickfogerty as you can see the tests failed! Something was wrong with the @types when TS was upgraded the other day. To test you can run sh tasks/e2e-simple.sh to test this stuff locally.

If you check #74 we are having a discussion about moving to awesome-typescript-loader.

@DorianGrey
Copy link
Collaborator

The error the Travis build complains about refers to the react typings in use.

/home/travis/build/wmonk/create-react-app-typescript/node_modules/@types/react/index.d.ts
(181,11): error TS2559: Type 'Component<P, S>' has no properties in common with type 'ComponentLifecycle<P, S>'.

This error was always present, it's just that typescript was unable to detect it properly before 2.4, which introduced improved checks for generics.

However, the types used here seem to be outdated - the line mentioned does no longer exist. I can confirm that this error is not present using the most typings for react, i.e. "@types/react": "^15.0.34".

Ts-loader version 2.2.1 is the minimum version required to work on typescript 2.4.1, see TypeStrong/ts-loader#566 for more details.
@frederickfogerty
Copy link
Contributor Author

@DorianGrey thanks for that! I was waiting for that fix to come through.

@wmonk the build is now passing after updating the @types/react dependency

@gyzerok
Copy link

gyzerok commented Jul 7, 2017

Hi folks!

I am really looking forward for this to be merged since I need exactly this better generics type checks from 2.4 :)

@wmonk wmonk merged commit 7395212 into wmonk:master Jul 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants