Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Tests for type information #441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mike-north
Copy link
Member

We ran into some problems where type information was in misalignment with documentation (i.e., #440)

This PR sets up infrastructure for testing type information using dtslint.

Some fixes were needed in types for the library itself, but they all seem like improvements

@@ -1,6 +1,6 @@
import jQuery from 'jquery';
import * as jQuery from 'jquery';
Copy link
Member Author

Choose a reason for hiding this comment

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

This does type information consumers a favor by allowing ember-ajax to work without forcing them to turn on allowSyntheticDefaultImports or esModuleInterop flags in their tsconfig.json. Libraries should generally not enable these flags for this reason

Copy link
Member Author

@mike-north mike-north Mar 22, 2019

Choose a reason for hiding this comment

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

Looks like we may need to resolve this in a separate PR because babel doesn't like the wildcard import (worth noting that tsc would compile this correctly)

@mike-north mike-north force-pushed the ts-tests branch 6 times, most recently from 947b54a to bcc97da Compare March 22, 2019 20:45
"strictNullChecks": true,
"strictFunctionTypes": true,
"noEmit": true,
"allowSyntheticDefaultImports": true,
Copy link
Member Author

Choose a reason for hiding this comment

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

This indicates that all consumers also need this flag. More info here: #441 (comment)

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