/Knowledge/sources/honojs__hono/llms-full/rpc-known-issues-ide-performance-compile-your-code-before-using-it-recommended--b6cfe19e14a1.md

RPC: Known issues > IDE performance > Compile your code before using....

RPC: Known issues IDE performance Compile your code before using it (recommended) Source evidence: /Sources/honojs hono/provenance.md Canonical citation: htt...

RPC: Known issues > IDE performance > Compile your code before using it (recommended)

Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#compile-your-code-before-using-it-recommended

Summary

tsc can do heavy tasks like type instantiation at compile time! Then, tsserver doesn't need to instantiate all the type arguments every time you use it. It will make your IDE a lot faster! Compiling your client including the server a...

Content

tsc can do heavy tasks like type instantiation at compile time! Then, tsserver doesn't need to instantiate all the type arguments every time you use it. It will make your IDE a lot faster!

Compiling your client including the server app gives you the best performance. Put the following code in your project:

import { app } from './app'
import { hc } from 'hono/client'

// this is a trick to calculate the type when compiling
export type Client = ReturnType<typeof hc<typeof app>>

export const hcWithType = (...args: Parameters<typeof hc>): Client =>
  hc<typeof app>(...args)

After compiling, you can use hcWithType instead of hc to get the client with the type already calculated.

const client = hcWithType('http://localhost:8787/')
const res = await client.posts.$post({
  form: {
    title: 'Hello',
    body: 'Hono is a cool project',
  },
})

Metadata

{
  "chunk_index": 0,
  "citation": "https://hono.dev/llms-full.txt#compile-your-code-before-using-it-recommended",
  "coverage_role": "overview",
  "qualified_title": "Hono / llms-full / RPC > Known issues > IDE performance > Compile your code before using it (recommended) (1)",
  "retrieved_at": "2026-07-02T05:51:01Z",
  "section_index": 72,
  "source_id": "/honojs/hono",
  "source_type": "llms_full",
  "target_label": "llms-full",
  "title": "RPC: Known issues > IDE performance > Compile your code before using it (recommended)",
  "upstream_url": "https://hono.dev/llms-full.txt",
  "version": "2026"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/rpc-known-issues-ide-performance-compile-your-code-before-using-it-recommended--b6cfe19e14a1.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.