-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switched to using dtslint from just running tsc --noEmit for typescript tests #421
Conversation
That's great!
Edit: Sorry, I just saw that you already changed the other packages too |
I think dtslint requires that the dts file is named index.d.ts (although I could be wrong about this, I'll check). But yeah I'll make sure everything is consistent. |
…pt tests. A few related changes, some as a side-effect of doing so: * Renamed typings directory to types because this seems to be more standard. * Renamed emotion.d.ts, etc to index.d.ts because dtslint seems to require this. * Stopped "build" running before "test:typescript" as this is not actually necessary.
e8d9e0d
to
14543f7
Compare
The new version of dtslint has fixed those errors I was getting. I'm just getting a couple of errors with typescript@next (https://travis-ci.org/emotion-js/emotion/builds/292255135#L681), then this'll be done. It's because of strictFunctionTypes, which is being introduced in TypeScript 2.6, which has got something to do with variance. Any ideas, besides just turning off this flag? |
The above problem is now fixed. |
What:
Changed the TypeScript tests to using dtslint.
Why:
$ExpectError
to assert that a certain statement does type error, which the previous type tests did not.How:
By changing from running
tsc --noEmit
to runningdtslint
for running the TypeScript tests.Checklist:
I'm having trouble running the dtslint tests for the react-emotion package - some of the features used in the dts files require a new version of TypeScript but I keep getting an error (microsoft/dtslint#78) when trying to use new versions of TypeScript.
This PR is just to make sure you agree with this direction before I pursue it even more and to collaborate if anyone else is working on it.
A few related changes, some as a side-effect of moving to dtslint: