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 (#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
lewandom and tw15egan authored Nov 1, 2023
1 parent 2eaa90d commit 9598693
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 9598693

Please sign in to comment.