/Wiki/sources/honojs__hono/2026/https-raw-githubusercontent-com-honojs-hono-main-8eb7fa90328d-the-arguments-of-generics-for-new-hono-have-been-changed-s0020-c0000.md

The arguments of Generics for `new Hono` have been changed - hono-docs

The arguments of Generics for new Hono have been changed Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://raw.githubuserc...

The arguments of Generics for new Hono have been changed

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://raw.githubusercontent.com/honojs/hono/main/docs/MIGRATION.md#the-arguments-of-generics-for-new-hono-have-been-changed

Summary

Now, the constructor of "Hono" receives Variables and Bindings. "Bindings" is for types of environment variables for Cloudflare Workers. "Variables" is for types of c.set/c.get ```ts type Bindings = { KV: KVNamespace Storage: R2B...

Content

Now, the constructor of "Hono" receives Variables and Bindings. "Bindings" is for types of environment variables for Cloudflare Workers. "Variables" is for types of c.set/c.get

type Bindings = {
  KV: KVNamespace
  Storage: R2Bucket
}

type WebClient = {
  user: string
  pass: string
}

type Variables = {
  client: WebClient
}

const app = new Hono<{ Variables: Variables; Bindings: Bindings }>()

app.get('/foo', (c) => {
  const client = c.get('client') // client is WebClient
  const kv = c.env.KV // kv is KVNamespace
  //...
})
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-raw-githubusercontent-com-honojs-hono-main-8eb7fa90328d-the-arguments-of-generics-for-new-hono-have-been-changed-s0020-c0000.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.