WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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
I am trying to share Hono RPC types between the browser and a server. I am using Deno for both projects. The browser app is using NPM compatibility (package.json + deno.lock) while the server is a normal Deno project.
When I try to share the RPC type from the server to the browser, I get an error from deno check:
TS2344 [ERROR]: Type 'Hono<BlankEnv, { "/hello": { $post: { input: any; output: `hello, ${any}!`; outputFormat: "text"; status: ContentfulStatusCode; }; }; }, "/">' does not satisfy the constraint 'Hono<any, any, any>'....trimmedTypes have separate declarations of a private property '_basePath'
I found my way to this discussion and tried the suggestions, but to no avail.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to share Hono RPC types between the browser and a server. I am using Deno for both projects. The browser app is using NPM compatibility (
package.json+deno.lock) while the server is a normal Deno project.When I try to share the RPC type from the server to the browser, I get an error from
deno check:I found my way to this discussion and tried the suggestions, but to no avail.
Beta Was this translation helpful? Give feedback.
All reactions