[BUG] Empty TypeScript declaration file
See original GitHub issueDescribe the bug
The package that is deployed to npm does not include anything in index.d.ts
. It looks like this:
export {};
//# sourceMappingURL=index.d.ts.map
To Reproduce Steps to reproduce the behavior:
npm install gotql
- Open node_modules/gotql/dist/index.d.ts
Current behavior
This package can’t be used in a TypeScript project.
Expected behavior
Types should be deployed within that package.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
"emitDeclarationOnly" + "stripInternal" produces empty *.d.ts files
this seems right to me. an output file is always generated for an input file. e.g. if you compile a file a.ts with...
Read more >Type not being found from declaration file Typescript
So I have tried adding the namespace (namespace dropzone {}) to the declaration file, and then the error is the same. When adding...
Read more >Type Declarations
TypeScript includes declaration files for all of the standardized built-in APIs available in JavaScript runtimes. This includes things like methods and ...
Read more >no-useless-empty-export - TypeScript ESLint
An empty export {} statement is sometimes useful in TypeScript code to turn a file that would otherwise be a script file into...
Read more >Declaration Files - TypeScript Deep Dive - Gitbook
d.ts or vendor.d.ts ). If a file has the extension .d.ts then each root level definition must have the declare keyword prefixed to...
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
It works now with
1.6.2
. But the next problem isUserOptions
. It is an object with a property callederrorStatusCode
with the descriptionDefault error code to send back to the user on error (defaults to 500)
. But if you look at your types it is not optional. That means that following will not compile because I do not defineerrorStatusCode
:@screendriver If you could please fill in another issue about this, so I can take a better look 🙂