chore: update Env declaration to extend Record<string, unknown>

This commit is contained in:
2024-06-09 11:01:03 -04:00
parent 04bd6c29cc
commit 5843dfdeb2
2 changed files with 5 additions and 3 deletions

View File

@@ -28,7 +28,9 @@ envSourceFile.insertImportDeclaration(2, {
moduleSpecifier: "hono",
namedImports: ["Env as HonoEnv"],
});
envSourceFile.getInterfaceOrThrow("Env").addExtends("HonoEnv");
envSourceFile
.getInterfaceOrThrow("Env")
.addExtends(["HonoEnv", "Record<string, unknown>"]);
envSourceFile.getInterfaceOrThrow("Env").addProperties(
secretNames.map((name) => ({
name,