typings.d.ts is not working as described in readme
See original GitHub issueI tried to add a global typings.d.ts exactly as described in readme but TypeScript compiler says Cannot find module 'typeless-package'.
Maybe the description is outdated?
Do I have to add it manually to tsconfig.json? If so i get the same error:
"typeRoots": [ "../node_modules/@types", "./typings.d.ts" ]
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Unable to find typings.d.ts and declare modules in angular 2 ...
This looked very promising, but I was forced to declare the variables in the component itself (in the ts file) instead of a...
Read more >TypeScript rules for Bazel - bazelbuild/rules_nodejs
The only reason to use raw tsc is if you want to compile a directory of .ts files and cannot enumerate them ahead-of-time...
Read more >File: README — AWS SDK for JavaScript
js typings, you may encounter compilation issues when using the typings provided by the SDK in an Angular project created using the Angular...
Read more >Usage of Angular libraries published to npm
Typically, library packages include typings in .d.ts files; see examples in node_modules/@angular/material . If the package of your library does not include ...
Read more >TypeScript and esbuild - Janessa Garrow
esm.js , and index.d.ts file. Since our TypeScript files from src are being compiled, bundled, ...
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 Free
Top 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
@osadan
When I add
typings.d.ts
to thetypeRoots
config I get:Oh, I found there is no need to add
typings.d.ts
to thetypeRoots
config — just write your declarations intypings.d.ts
and it works.Im not sure if module is up to date in typescript? Didnt it got replaced by namespace?
I tried:
Then:
But it says
Module not found: Error: Can't resolve '../../typings' in '/<<path>>/src/app/shared'