25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
|
diff --git a/build/commands/generate.js b/build/commands/generate.js
|
||
|
index 4e785ef7cc45430eade6bed6fb84749640c0f9a8..9c8d907023c61d7d7d6fe47628423337813c1e81 100644
|
||
|
--- a/build/commands/generate.js
|
||
|
+++ b/build/commands/generate.js
|
||
|
@@ -107,7 +107,7 @@ var ApiTypesGenerator = class {
|
||
|
return;
|
||
|
const definition = schema.getDefinitions().at(0);
|
||
|
const importType = this.#getIdentifierImportType(schema);
|
||
|
- if (!definition || !importType) {
|
||
|
+ if (!definition) {
|
||
|
this.#logger.warning(`Unable to find the schema file for ${schema.getText()}`);
|
||
|
return;
|
||
|
}
|
||
|
@@ -214,10 +214,6 @@ var ApiTypesGenerator = class {
|
||
|
}
|
||
|
writer.writeLine(`] as const;`);
|
||
|
writer.writeLine(`export const api = {`).writeLine(` routes,`).writeLine(` definition: {} as ApiDefinition`).writeLine(`}`);
|
||
|
- writer.writeLine(`declare module '@tuyau/inertia/types' {`);
|
||
|
- writer.writeLine(` type ApiDefinition = typeof api`);
|
||
|
- writer.writeLine(` export interface Api extends ApiDefinition {}`);
|
||
|
- writer.writeLine(`}`);
|
||
|
});
|
||
|
await file.save();
|
||
|
}
|