We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0595018 commit 859706dCopy full SHA for 859706d
packages/wrangler/src/type-generation/index.ts
@@ -464,13 +464,13 @@ export async function generateEnvTypes(
464
: undefined;
465
466
const exportExists = serviceEntry?.exports?.some(
467
- (e) => e === service.entrypoint
+ (e) => e === (service.entrypoint ?? "default")
468
);
469
470
let typeName: string;
471
472
if (importPath && exportExists) {
473
- typeName = `Service<import("${importPath}").${service.entrypoint ?? "default"}>`;
+ typeName = `Service<typeof import("${importPath}").${service.entrypoint ?? "default"}>`;
474
} else if (service.entrypoint) {
475
typeName = `Service /* entrypoint ${service.entrypoint} from ${service.service} */`;
476
} else {
0 commit comments