Skip to content

Commit cfd774a

Browse files
committed
Update pluginTypesGenerator.js
1 parent f24ec2e commit cfd774a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

other/pluginTypesGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ globalThis.Underline = {
8080
});
8181

8282
await makeSureFolderExists(path.resolve(__dirname, "../generated"));
83-
let result = `export class Types {\n${pluginTypes.map(i => ` ${i};`).join("\n")}\n};\n${TEventNames.length ? `export type TEventNames = ${TEventNames.join(" | ")};` : ""}\n${TEvents.length ? `export type TEvents = ${TEvents.join(" | ")};` : ""}\n${TInterfaces.join("\n")}\n`.trim();
83+
let result = `export class Types {\n${pluginTypes.map(i => ` ${i};`).join("\n")}\n};\n${`export type TEventNames = ${TEventNames.join(" | ").trim() || "any"};`}\n${`export type TEvents = ${TEvents.join(" | ").trim() || "any"};`}\n${TInterfaces.join("\n")}\n`.trim();
8484
console.info(result);
8585
await fs.promises.writeFile(path.resolve(__dirname, "../generated/pluginTypes.d.ts"), result);
8686

0 commit comments

Comments
 (0)