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

Typescript typings tests #978

Open
char0n opened this issue Jul 13, 2019 · 2 comments
Open

Typescript typings tests #978

char0n opened this issue Jul 13, 2019 · 2 comments
Labels

Comments

@char0n
Copy link
Owner

char0n commented Jul 13, 2019

Is your feature request related to a problem? Please describe.

We want to have our TypeScript typings tested. Library called dtslit from MicroSoft allows us to do it. We maintain our typins in types/index.d.ts file. Tests from typings are located in types/test directory.

Describe the solution you'd like

To create new tests for a typings, identify a function name that is missing from the types/tests directory by looking at src directory. Create a new file reflecting the name in src directory but using .ts extension. Write the tests for typings. Look into other typings tests how to do that. If the tests don't pass you have to modify the typing definition located as types/index.d.ts

Additional context

Related PR where the effort was started here: #977. All the linked PRs to this issue demonstrates how to add new tests for typings.

@char0n char0n added the Hacktoberfest Hacktoberfest 2020 label Oct 6, 2019
char0n added a commit that referenced this issue Oct 6, 2019
char0n added a commit that referenced this issue Oct 6, 2019
char0n added a commit that referenced this issue Oct 6, 2019
char0n added a commit that referenced this issue Oct 6, 2019
char0n added a commit that referenced this issue Oct 6, 2019
@char0n char0n removed the Hacktoberfest Hacktoberfest 2020 label Dec 25, 2019
@char0n char0n changed the title Finish our typescript definition testing via dtslint Typescript typings tests Dec 25, 2019
@char0n char0n added the Hacktoberfest Hacktoberfest 2020 label Sep 13, 2020
@dbartholomae
Copy link
Contributor

I'll add a couple (and in doing so already found a typing error) soon.

char0n pushed a commit that referenced this issue Oct 4, 2020
- test(async): add type test
- test(cata): add type test
- fix(cata): use correct type in curried version
- test(compact): add type test
- test(concatAll): add type test
- test(concatRight): add type test

Refs #978
@Maushundb
Copy link
Contributor

For reference, TS 3.9 has added @ts-expect-error comments built into the library to test failed typed assertions. dtslint seem a bit more strict since you can assert the actual type, but worth noting.

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

No branches or pull requests

3 participants