You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the npm package doesn't show the "TS" icon to indicate that it has type definitions, despite having them; judging from this Stack Overflow thread, this seems to be caused by our package.json files not having a "types" field. If you install Rose in a fresh project and try to import it, TypeScript gives this error:
Cannot find module 'rose' or its corresponding type declarations.
As described in the top answer of that Stack Overflow thread, you can resolve this error on the client side via this tsconfig.json:
However, we should probably configure Rose itself to work properly with TypeScript even for users who don't know or don't care to use the more modern module resolution, probably by just setting "types".
Incidentally, if you just use the above in tsconfig.json, TypeScript also complains, due to a recent change in TypeScript 5.2:
Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'.
We have the same error in our own tsconfig.json files in this repository; it would probably be a good idea to fix those errors, but I don't immediately know how to do that because I don't know what "module": "Node16" actually means as contrasted with "module": "ES2022".
The text was updated successfully, but these errors were encountered:
Currently the npm package doesn't show the "TS" icon to indicate that it has type definitions, despite having them; judging from this Stack Overflow thread, this seems to be caused by our
package.json
files not having a"types"
field. If you install Rose in a fresh project and try to import it, TypeScript gives this error:As described in the top answer of that Stack Overflow thread, you can resolve this error on the client side via this
tsconfig.json
:However, we should probably configure Rose itself to work properly with TypeScript even for users who don't know or don't care to use the more modern module resolution, probably by just setting
"types"
.Incidentally, if you just use the above in
tsconfig.json
, TypeScript also complains, due to a recent change in TypeScript 5.2:The error can be resolved via this
tsconfig.json
:We have the same error in our own
tsconfig.json
files in this repository; it would probably be a good idea to fix those errors, but I don't immediately know how to do that because I don't know what"module": "Node16"
actually means as contrasted with"module": "ES2022"
.The text was updated successfully, but these errors were encountered: