最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - VSCode: Hide or sort suggestions of Aria and HTMLAttributes - Stack Overflow

programmeradmin2浏览0评论

I'm using the ElasticUI component library in my project, each type has distinct properties I can use, however, these types do often have a union with HTMLAttributes like this:

export type EuiSelectableOption<T = {}> = ExclusiveUnion<EuiSelectableGroupLabelOption<T>, EuiSelectableLIOption<T>>;

export type EuiSelectableGroupLabelOption<T> = _EuiSelectableGroupLabelOption & T; type _EuiSelectableLIOption = EuiSelectableOptionBase & Exclude<HTMLAttributes<HTMLLIElement>, 'id'>;

Trouble is, that means my suggestion box in VSCode is littered with HTMLAttributes and Aria props. All the props belonging to the package itself are often mixed up and hard to find.

I want to either:

  1. Sort suggestions based on distance from current file. So it'll go File Types > EuiSelectableOption > EuiSelectableGroupLabelOption > _EuiSelectableLIOption > EuiSelectableOptionBase > HTMLAttributes

  2. Or just completely ignore HTMLAtrributes & Aria from showing in the suggestions at all.

Here's an image to illustrate what I mean:

发布评论

评论列表(0)

  1. 暂无评论