Files
lucide/tools/build-icons/types.ts
Copilotcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Eric Fennis
75b55160aa chore(dev): upgrade ESLint to latest compatible stack (v10) (#4378)
* chore: upgrade eslint to v9 latest with compatible lint deps

Agent-Logs-Url: https://github.com/lucide-icons/lucide/sessions/f7c1f1b5-d213-4afa-91a8-b799a16397ec

* Fix eslint config

* Fix a lot of eslint errors

* Fix eslint

* Fix eslint errors

* Fix eslint errors

* Fix types

* Fix eslint warning

* Format code

* Add eslint 10

* Remove unused vars

* Update pnpm

* Update deps

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2026-08-18 13:09:22 +02:00

51 lines
1.3 KiB
TypeScript

export type SVGProps = Record<string, string | number>;
export type IconNode = [tag: string, attrs: SVGProps][];
export type IconNodeWithChildren = [tag: string, attrs: SVGProps, children: IconNode];
export type IconData = {
name: string;
node: IconNode;
aliases?: string[];
} & ({ size: number } | { width: number; height: number });
export interface ExportTemplate {
componentName: string;
iconName: string;
children: IconNode;
getSvg: () => Promise<string>;
deprecated: boolean;
deprecationReason: string;
iconData: IconData;
}
export type TemplateFunction = (params: ExportTemplate) => Promise<string>;
export type Path = string;
export type AliasDeprecationReason = 'alias.typo' | 'alias.name' | 'alias.duplicate';
export type AliasDeprecation = {
name: string;
deprecated: true;
deprecationReason: AliasDeprecationReason;
};
export type IconDeprecationReason = 'icon.renamed' | '';
export type IconMetadataBase = {
categories: string[];
aliases?: AliasDeprecation[];
tags: string[];
deprecationReason?: IconDeprecationReason;
deprecated?: boolean;
};
export type IconMetadataWithDeprecation = IconMetadataBase & {
deprecated: true;
deprecationReason?: IconDeprecationReason;
};
export type IconMetadata = IconMetadataBase | IconMetadataWithDeprecation;