Adjust types

This commit is contained in:
Eric Fennis
2025-02-10 13:58:34 +01:00
parent 884bf6fb10
commit 6b618cd030
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ import { IconNode } from '../types';
* @returns {IconNode}
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
*/
const _${exportName}: string = ${JSON.stringify(children)}
const _${exportName}: IconNode = ${JSON.stringify(children)}
export default _${exportName};
`;
+1 -3
View File
@@ -1,5 +1,3 @@
// className is not supported in svg elements
export type SVGProps = Record<string, string | number>;
export type IconNodeChild = readonly [tag: string, attrs: SVGProps];
export type IconNode = readonly [tag: string, attrs: SVGProps, children?: IconNodeChild[]];
export type IconNode = readonly [tag: string, attrs: SVGProps][];
export type Icons = { [key: string]: IconNode };