Skip to content

Conversation

@shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented Jan 30, 2021

Pull Request

Problem

Using a TypeScript compile (tsc) to test the TypeScript typings was useful, but some minor annoyances:

  • felt a bit strange writing lots of fake code
  • declaring lots of unused variables to do return type checking
  • suppressing lint warnings from the dummy code, like the unused variables!
  • type checking by assignment is not strict

Solution

Use tsd for a fairly direct conversion to strict type tests. Instead of assigning to a typed variable, use expectType.

One related change: tsd complained about using typings property in package.json, and in fact types is more standard so changed to use that.

ChangeLog

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

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.

2 participants