TypeScript rejecting type definition
See original GitHub issueUsing mini-signals as an apparent sub-dependency of pixi.js in a stencil.js-based project, this line of code is causing a rather strict build configuration to fail:
Error is:
[ ERROR ] TypeScript: ./node_modules/mini-signals/typings/mini-signals.d.ts:19:2
An export assignment cannot be used in a module with other exported elements.
L19: export = MiniSignal;
L20: }
I can safely remove this line to circumvent this build obstacle, but I assume this isn’t commonly intended solution.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
javascript - Typescript Promise rejection type - Stack Overflow
reject accepts any argument that doesn't affect type of a promise. Currently Promise cannot be typed any better. This results from the fact...
Read more >Promise rejection type. · Issue #39680 · microsoft/TypeScript
When handling promise rejections, the type any isn't very useful. I would be useful to have the rejection have an actual type without...
Read more >Learn How does TypeScript Promise type work? - eduCBA
rejected: This state in Promise type refers to the promise operation being failed. Example #1. TypeScript promise type Timeout asynchronous function. var ...
Read more >Specifying type a promise rejects in defintions (d.ts)? - Reddit
In a TypeScript definition file is it possible to specify what type of error the Promise rejects with? Right now I've been helping...
Read more >Promise.reject() - JavaScript - MDN Web Docs
reject() is generic and supports subclassing, which means it can be called on subclasses of Promise , and the result will be a...
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
I came across this issue when researching how to solve the same problem that I’m having with pixi.js and this dependency. See my related issue here: https://github.com/pixijs/pixi.js/issues/7305
When I add in the workaround to my tsconfig.json file it does not resolve the problem for me.
Hello’,
Workaround: Add following configuration to the tsconfig.json (compilerOptions):