c.env.* typed as unknown after void prepare
@TheAlexLichter がすでに取り組んでいます。
2026年5月29日 から。
評価
この issue はまだ評価されていません。
説明
dependencies: void: 0.9.0 | ts: 6.0.3, also 5.9.3
repo: https://github.com/totallynotdavid/void-env-repro
Even after void prepare, any env var accessed via c.env in a handler is typed as unknown despite being declared in env.ts.
TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
The cause seems to be the generated .void/env.d.ts:
type _VoidEnvShape = _VoidEnvSchema extends { default: infer D } ? D : ...;
declare module "void/handler" {
interface CloudBindings extends _VoidEnvShape {}
}
Note: this surfaces only when typeAware and typeCheck are enabled in the vite-plus lint options.
The workaround i've used:
import type { CloudBindings } from "void/handler";
declare module "void/handler" {
interface CloudBindings {
API_SECRET: string;
}
}
- 主要言語
- TypeScript
- スター
- 149
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
void-sdk/void のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
Incorrect bindings オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100