equinor/design-system

suggestion: Intellisense suggestions for built-in icons

开放

#4,253 创建于 2025年11月21日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (74 个派生)auto 404
good first issue

仓库指标

星标
 (147 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

https://github.com/equinor/design-system/blob/2f4267b5436c685e01cce1ef937b234f39c7153b/packages/eds-icons/src/types.ts#L5

By changing this definition the intellisense suggestions will suggest the known icons, while also allowing other strings.

export type IconName = keyof typeof icons | (string & {});

Alternatively an export of "EdsBuiltinIcons" would a nice alternative. Then I could use ({"" satisfies EdsBuiltinIcon}) to get intellisense for those.

Before:

After:

贡献者指南