Typescript definitions missing from package
See original GitHub issueDescribe the bug
I see that there is a typescript definitions file on the repo (the .d.ts
file), but seems that is not being pushed on the package.
To Reproduce
Steps to reproduce the behavior:
- Create a new React app with typescript support (
npx create-react-app new-app --typescript
) - Add the disqus-react package (
npm install disqus-react
) - Usin VSCode, open
App.tsx
and import the module (import Discus from 'disqus-react';
) - See tooltip error on the imported part.
Expected behavior
Typescript definitions should load
Screenshots
Specifications:
- OS: Windows 10 1903 (latest available version), running Ubuntu via WSL
- Package version: 1.0.5
- Node version: 12.4.0
Additional context
Looking at the package contents, seems that the .d.ts
file is missing!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to include missing type definition files in typescript ...
I would suggest switching to types from typeRoots and using an include pattern rather than files . { "compilerOptions": { "lib": ["dom" ...
Read more >How to Declare Missing Types for External Libraries -- newline
Custom Types Declaration#. First, in your tsconfig.json add a directory path to type declarations:.
Read more >typescript definition is missing in npm package #4 - GitHub
redux-immer@1.0.3 package is missing the typescript definition file You can quickly see the actual file contents if you run npm pack ...
Read more >How to add missing TypeScript definitions to third party ...
A quick note on how to add missing TypeScript definitions to third party packages.
Read more >Vue with TypeScript - how to handle missing type definitions ...
Hi Folks, I have 3 or so Vue 2 projects where I chose Typescript (via cli scaffolding). For most the time it is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@PedroLamas The PR containing the typescript definitions was just merged a few days ago, but I’m working on get the npm package updated today.
im getting
Cannot find module 'disqus-react'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
with"disqus-react": "^1.1.5"
using typescript…to solve this i added
"moduleResolution":"node"
to mytsconfig.json