Skip to content

Conversation

suneettipirneni
Copy link
Member

@suneettipirneni suneettipirneni commented Nov 13, 2021

Please describe the changes this PR makes and why it should be merged:

Uses the tsd package to run tests on types. This allows more nuanced type checking than tsc, and provides clear output when types don't match. Not all of the assertType's have been replaced, I've only done a few to demo how it works.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@suneettipirneni suneettipirneni marked this pull request as draft November 13, 2021 16:32
@suneettipirneni suneettipirneni marked this pull request as ready for review November 13, 2021 23:37
Co-authored-by: Noel <buechler.noel@outlook.com>
@kyranet
Copy link
Member

kyranet commented Nov 16, 2021

CI is failing.

Also, isn't the new file very similar to our index.ts file? Can't we re-use it somehow?

@suneettipirneni
Copy link
Member Author

suneettipirneni commented Nov 16, 2021

The test.ts file is the same file, it's just showing as a new file in the diff.

@iCrawl
Copy link
Member

iCrawl commented Nov 23, 2021

I'll just move forward to merge this, since it is a better alternative to maintaining some util functions ourselves and have proper testing this way.

@iCrawl iCrawl merged commit 9f3bf29 into discordjs:main Nov 23, 2021
@iCrawl iCrawl modified the milestones: Version 13.x, Version 13.4 Nov 23, 2021
@suneettipirneni suneettipirneni deleted the types/tsd-tests branch February 7, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants