Skip to content
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

feat!: ignore typingsFile option and deprecate @type pragma #40

Closed
wants to merge 1 commit into from
Closed

feat!: ignore typingsFile option and deprecate @type pragma #40

wants to merge 1 commit into from

Conversation

mrazauskas
Copy link
Contributor

@SimenB Another alternative which would unblock jestjs/jest#12198

This change makes the runner work just like it was in v1.1.0. The typingsFile option always receives a path which exist in the file system and this silences the tsd error: "The type definition [file] does not exist."

This is the same trick which was documented as a workaround (so documentation can be skipped).

This change does not influence tsd's behaviour related with testing type definitions. All type checking works as before. And jestjs/jest#12199 would be unnecessary.


Not sure I like this solution. Just another workaround. Might be worth to fork tsd, remove all extra checks it does and to use that fork. Simply a library which does one task – tests types.

I have a draft already. Just wanted to check if it is worth the efforts?

@mrazauskas
Copy link
Contributor Author

Forked tsd-lite is the cleanest solution I could come up. See https://github.com/mrazauskas/tsd-lite

No need for any workarounds. Also it is lighter, because I removed unnecessary CLI and few other dependencies.

The code is finished. Just leaving it for cool down. Will take another look tomorrow and will publish it.

@mrazauskas mrazauskas closed this Jan 3, 2022
@mrazauskas mrazauskas deleted the ignore-typingsFile branch January 3, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant