Comments (5)
postcss-image-set-function
uses module.exports =
, but its type definitions specify export default
.
https://arethetypeswrong.github.io/[email protected]
from arethetypeswrong.github.io.
Is there an example of this in a real package I can look at?
from arethetypeswrong.github.io.
Ah, I thought this would be an easy fix, but it looks like I should probably address this note:
before expanding the scope of this rule, which requires bringing the type checker into play, like #22 also requires. Turning the rule on for other resolution modes (I think it was an accident that I didn’t before) made postcss really blow up, because it can’t identify the pattern:
module.exports = AtRule
AtRule.default = AtRule
that they use throughout, which should not trigger the FalseDefaultExport problem.
I started some work on type checking / whole program support a few days ago, but I’m still just working on this in my spare time.
from arethetypeswrong.github.io.
Another one is [email protected]. (It’s fixed in newer versions.) It’s reported as an issue for ESM, but really it’s an issue for CJS.
When compiling a default import to CJS consuming that package, those types are fine. However, when manually writing CJS and using checkJs
, it’s not nice to use such types.
It’s different though, because unlike postcss-image-set-function
, [email protected]
at least could be used without esModuleInterop
.
from arethetypeswrong.github.io.
I think it would make sense to display a ?
for the node16 (from CJS)
row instead of a ✅ until this issue has been fixed since claiming that the types are ok when they're not is misleading and confusing.
Or perhaps add a disclaimer that all ✅ are to be taken with a grain of salt since this tool doesn't yet support type checking.
from arethetypeswrong.github.io.
Related Issues (20)
- TS 5.3 incompatibility HOT 3
- core/dist/types.d.ts contains triple-slash reference to ts-expose-internals HOT 1
- What to do for missing export = when it's TypeScript's fault (kinda) HOT 2
- Update MissingExportEquals.md for import default = fetch HOT 3
- lodash types are wrong (or lying?) HOT 6
- Specifying @types packages in the web UI is broken
- Trailing `/` exports don’t get detected as wildcards
- ERR_REQUIRE_ESM when upgrading from 0.13.6 to 0.13.8 HOT 2
- Indicate when JS is unanalyzable
- Understand basic UMD modules HOT 1
- Rule for missing default export / completely wrong exports?
- confusing resolution failure HOT 14
- Why are paths with colons unresolvable? HOT 2
- No errors for ESM module resolution, while errors are expected HOT 3
- [FEATURE]: Create a badge that says whether or not a package passes this repository's tests HOT 3
- Bug: This is too good
- Conditional exports syntax HOT 1
- Seeking NodeJS + TypeScript Demo Project with CJS and ESM Exports HOT 1
- Incorrectly passing when types missing in package exports HOT 3
- How to make this work with svelte? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arethetypeswrong.github.io.