Skip to content

Commit

Permalink
fix(icons-react): fix exports in individual icon TypeScript declarati…
Browse files Browse the repository at this point in the history
…ons (carbon-design-system#15032)

* fix(icons-react): fix exports in individual icon TypeScript declarations

* fix(icon-build-helpers): add missing declare keyword in TS builder

---------

Co-authored-by: TJ Egan <[email protected]>
  • Loading branch information
2 people authored and tay1orjones committed Nov 1, 2023
1 parent d4d638a commit 5518b77
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ async function writeModuleTypes(modules, outDir) {
templates.banner +
'\n' +
"import type { CarbonIconType } from './CarbonIcon';\n" +
'export const ' +
m.name +
': CarbonIconType;\n';
`declare const ${m.name}: CarbonIconType;\n` +
`export default ${m.name}\n`;
const filename = path.resolve(outDir, m.filepath.replace(/\.js$/, '.d.ts'));
await fs.writeFile(filename, content);
}
Expand Down

0 comments on commit 5518b77

Please sign in to comment.