remix
remix copied to clipboard
JsonFunction not exported from remix-node as type
What version of Remix are you using?
1.7.2
Steps to Reproduce
npm install @remix-run/node
Expected Behavior
JsonFunction should be exported as a type from @remix-run/node
Actual Behavior
As you can see here remix-node/index.ts#L44, JsonFunction is not exported as a type.
Out of curiosity: What's your use case for having it exported?
I personally don't need it exported. The fact that it's a type not being exported as a type is causing TypeScript errors with some code generation from rmx-cli that re-exports some stuff from remix packages.
@kiliman would it make sense to have it exported?
I see. The issue is that Remix is exporting JsonFunction, but it's not exporting as a type. That's why you get a warning with the generator since it creates separate re-exports for types and non-types. That should just be moved to the export type block.
https://github.com/remix-run/remix/blob/416742725f4d454acff48e4654756a5949a5a742/packages/remix-node/index.ts#L38-L50
Fixed by #5204
🤖 Hello there,
We just published version v0.0.0-nightly-8346ace-20230124 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!
Thanks!
🤖 Hello there,
We just published version 1.12.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!
Thanks!