Closed buzzy closed 1 week ago
Hi @buzzy
Add a strict: true
in your tsconfig.json
:
diff --git a/tsconfig.json b/tsconfig.json
index 66b5e57..5c6a83b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,5 +1,8 @@
{
"files": [],
+ "compilerOptions": {
+ "strict": true
+ },
"references": [
{
"path": "./tsconfig.node.json"
@@ -8,4 +11,4 @@
"path": "./tsconfig.app.json"
}
]
-}
+}
I'll close this issue. If you need any help related to Hono, please reopen. Anyway, this issue is caused by TypeScript settings.
What version of Hono are you using?
4.5.3
What runtime/platform is your app running on?
Bun
What steps can reproduce the bug?
Pull this repo: https://github.com/buzzy/hono-vue
Look in the file /src/api/server.ts It's a very simple example that uses hono and zod-validator
Look in the file /src/api/client.ts
As you can see in the picture, all the types get imported correctly.
Now open file /src/views/HomeView.vue This is a Vue component file.
Using the exact same imports as in the server.ts, all types are working except for the input type. It's blank.
What is the expected behavior?
That all the types are imported, including the "input" attribute.
What do you see instead?
When using Hono RPC in a Vue component, the "input" is always blank.
Additional information
No response