This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
wikipedia-game-solver/patches/@tuyau__core@0.1.4.patch

25 lines
1.1 KiB
Diff
Raw Normal View History

2024-08-16 02:50:11 +02:00
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();
}