Skip to content

Commit 973249f

Browse files
aminyaskovy
authored andcommitted
fix: export the named types as declared
This will prevent some errors in Esbuild, where it expects the constants to be initialised even though they are in the .d.ts files
1 parent 00d8ffd commit 973249f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/typescript/class-names-to-type-definition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const quoteTypeDefault: QuoteType = "single";
2828
export const bannerTypeDefault: string = "";
2929

3030
const classNameToNamedTypeDefinition = (className: ClassName) =>
31-
`export const ${className}: string;`;
31+
`export declare const ${className}: string;`;
3232

3333
const classNameToType = (className: ClassName, quoteType: QuoteType) => {
3434
const quote = quoteType === "single" ? "'" : '"';

0 commit comments

Comments
 (0)