Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Allow packages to opt-in to typings-checker instead of tsc #292

Closed
wants to merge 1 commit into from

Conversation

danvk
Copy link

@danvk danvk commented Jan 22, 2017

Just throwing this out there to get some feedback. See DefinitelyTyped/DefinitelyTyped#1572 (comment)

For packages that opt-in, this would let them run their tests through typings-checker instead of tsc. typings-checker lets allows errors to be marked as expected and lets tests make assertions about the types of symbols. This helps prevent unintended any or {} types from creeping in.

@danvk
Copy link
Author

danvk commented Jan 23, 2017

See also danvk/typings-checker#18 — it might be easier to set up typings-checker as something that runs in addition to tsc rather than instead of it (just like tslint).

@ghost
Copy link

ghost commented Feb 22, 2017

I'm working on a new tester at https://github.com/andy-ms/dtslint (eventually this will be moved to https://github.com/Microsoft/dtslint). This will allow us to have just one tool instead of types-publisher + tsc + tslint + typings-checker. It includes a conversion of typings-checker into a lint rule at https://github.com/andy-ms/dtslint/blob/master/src/rules/expectRule.ts (Update: https://github.com/Microsoft/dtslint/blob/master/src/rules/expectRule.ts). Would this be OK?

I also removed the ability for $ExpectError to specify an error string, because we want to be able to change error messages without breaking any tests. You had already put that functionality under a flag.

@danvk
Copy link
Author

danvk commented Feb 22, 2017

@andy-ms cool! Glad to hear the TS team is improving tooling around testing typings files.

Feel free to use whatever code you like, just be sure to mention me as a contributor.

@ghost
Copy link

ghost commented Feb 23, 2017

Great! Closing in favor of #312.

This pull request was closed.
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.

1 participant