wikipedia-game-solver/patches/@tuyau__core@0.1.4.patch
Théo LUDWIG 4add77856e
All checks were successful
Chromatic / chromatic (push) Successful in 2m58s
CI / ci (push) Successful in 4m43s
CI / commitlint (push) Successful in 15s
chore: try Adonis Tuyau
2024-08-16 01:50:11 +01:00

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();
}