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

Update package.json typings field #1432

Merged
merged 3 commits into from Jun 4, 2019
Merged

Update package.json typings field #1432

merged 3 commits into from Jun 4, 2019

Conversation

diesal11
Copy link
Contributor

@diesal11 diesal11 commented Jun 4, 2019

'typings' in package.json needs to point to the Declaration file. It currently points to the just the folder

As a result IDEs like VSCode will auto import from 'canvas/typings' instead of canvas, This will fix that issue

  • Have you updated CHANGELOG.md?

@zbjornson
Copy link
Collaborator

Are you using Typescript 3.5.1 by chance? It looks like microsoft/TypeScript@5d188a8#diff-0049ad7158cd6170295446b6b60cb8a7 perhaps inadvertently changed the behavior; "index.d.ts" used to be implied. I'm good with this change (being explicit is good) but if the above is true, then I'm sure lots of packages will break once 3.5.1 becomes mainstream.

@zbjornson zbjornson merged commit dd0c7c2 into Automattic:master Jun 4, 2019
@zbjornson
Copy link
Collaborator

Hm, no. I can't reproduce the issue you described with typescript 3.5.1 either.

@diesal11
Copy link
Contributor Author

diesal11 commented Jun 4, 2019

Nope, my VSCode & project are currently on TS version 3.4.5. This may have been an error specific to VSC? I just noticed the incorrect imports and this seemed to fix the problem :)

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

2 participants