Skip to content

Commit

Permalink
Declarations - const enum to enums (#15235)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaananW authored Jun 27, 2024
1 parent 93d3b09 commit fe4df00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/dev/buildTools/src/generateDeclaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ function getModuleDeclaration(
return;
}
});
processedLines = processedLines.replace(/export declare /g, "export ");
processedLines = processedLines.replace(/export declare /g, "export ").replace(/export const enum/g, "export enum");

return `declare module "${moduleName}" {
${processedLines}
}
Expand Down Expand Up @@ -399,6 +400,8 @@ function getPackageDeclaration(
}
);

processedSource = processedSource.replace(/export const enum/g, "export enum");

processedSource = processedSource.replace(
/ global {([^}]*)}/gm,
`
Expand Down

0 comments on commit fe4df00

Please sign in to comment.