No types included in packages
See original GitHub issueDescribe the bug Documentation states:
Theme UI is written in TypeScript.
While most APIs in Theme UI should just work in TypeScript, there are a few advanced use cases which will differ slightly. This guide is intended to cover those use cases.
But with partial (e.g. @theme-ui/core
) installation there is no types included in package and no types present as @types/theme-ui__core
package:
TS7016: Could not find a declaration file for module '@theme-ui/core'. '/home/kir/work/mos-cat/libs/ds/node_modules/@theme-ui/core/dist/index.js' implicitly has an 'any' type.
Try `npm install @types/theme-ui__core` if it exists or add a new declaration (.d.ts) file containing `declare module '@theme-ui/core';`
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2ftheme-ui__core - Not found
To Reproduce
Try to use only @theme-ui/core
and @theme-ui/css
packages in TypeScript
Expected behavior It works with TypeScript out of the box.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
NPM Package doesn't have Types - node.js - Stack Overflow
The quick way is to create a globals.d.ts file and add the line: declare module "express-bearer-token";.
Read more >Documentation - Publishing - TypeScript
If your types are generated by your source code, publish the types with your source code. Both TypeScript and JavaScript projects can generate...
Read more >package.json - npm Docs
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >Modules: Packages | Node.js v19.3.0 Documentation
Package authors should include the "type" field, even in packages where all ... contains no package.json file, // and therefore inherits the "type"...
Read more >Using installed packages - mypy 0.991 documentation
New versions of stub packages often use type system features not supported by ... This also allows stubs not originally included with mypy...
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
I think we can close this? There are a bunch of other issues/PRs for the TypeScript conversion, sounds like the docs have been fixed appropriately.
@hasparus Sorry, I accidentally, “un-reverted” the docs trying something out. I think a more accurate version should be published now