Skip to content

Commit

Permalink
fix(icons-react): use declare keyword in bucket TypeScript types (car…
Browse files Browse the repository at this point in the history
  • Loading branch information
lewandom authored and danoro96 committed Jan 18, 2024
1 parent 7e94f02 commit 286e2e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function writeBucketTypes(buckets, outDir) {
for (const bucket of buckets) {
const iconLines = [];
for (const m of bucket.modules) {
iconLines.push('export const ' + m.name + ': CarbonIconType;');
iconLines.push('declare const ' + m.name + ': CarbonIconType;');
}
const bucketModule = `generated/${bucket.id}`;
const filepath = path.resolve(outDir, `${bucketModule}.d.ts`);
Expand All @@ -66,7 +66,7 @@ async function writeBucketTypes(buckets, outDir) {
'\n' +
"import type { CarbonIconType } from '../CarbonIcon';\n" +
iconLines.join('\n') +
'\n';
`\nexport { ${bucket.modules.map((m) => m.name).join(', ')} };\n`;
await fs.writeFile(filepath, content);
}
}
Expand Down

0 comments on commit 286e2e3

Please sign in to comment.