-
Notifications
You must be signed in to change notification settings - Fork 67
docs(core): fix useSet Interface component parsing error #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,47 +21,47 @@ function useSet<T>( | |||||||||||||||||||||||||
| ### 반환 값 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <Interface | ||||||||||||||||||||||||||
| name="" | ||||||||||||||||||||||||||
| type="[Set, SetActions]" | ||||||||||||||||||||||||||
| description="Set 상태와 이를 조작하는 액션을 포함한 튜플이에요." | ||||||||||||||||||||||||||
| :nested="[ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[0]', | ||||||||||||||||||||||||||
| type: 'Omit<Set<T>, \"add\" | \"clear\" | \"delete\">', | ||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||
| description: '변경 메서드가 숨겨진 현재 Set 상태예요.', | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[1].add', | ||||||||||||||||||||||||||
| type: '(value: T) => void', | ||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||
| description: 'Set에 값을 추가해요.', | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[1].remove', | ||||||||||||||||||||||||||
| type: '(value: T) => void', | ||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||
| description: 'Set에서 값을 제거해요.', | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[1].toggle', | ||||||||||||||||||||||||||
| type: '(value: T) => void', | ||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||
| description: '값이 없으면 추가하고, 있으면 제거해요.', | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[1].setAll', | ||||||||||||||||||||||||||
| type: '(values: Set<T> | T[]) => void', | ||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||
| description: 'Set의 모든 값을 교체해요.', | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[1].reset', | ||||||||||||||||||||||||||
| type: '() => void', | ||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||
| description: 'Set을 초기 상태로 리셋해요.', | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| ]" | ||||||||||||||||||||||||||
| name="" | ||||||||||||||||||||||||||
| type="[Set, SetActions]" | ||||||||||||||||||||||||||
| description="Set 상태와 이를 조작하는 액션을 포함한 튜플이에요." | ||||||||||||||||||||||||||
| :nested="[ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| name: '[0]', | ||||||||||||||||||||||||||
| type: 'Omit<Set<T>, add | clear | delete>', | ||||||||||||||||||||||||||
|
Comment on lines
+25
to
+30
|
||||||||||||||||||||||||||
| type="[Set, SetActions]" | |
| description="Set 상태와 이를 조작하는 액션을 포함한 튜플이에요." | |
| :nested="[ | |
| { | |
| name: '[0]', | |
| type: 'Omit<Set<T>, add | clear | delete>', | |
| type="[Omit<Set<T>, 'add' | 'clear' | 'delete'>, SetActions<T>]" | |
| description="Set 상태와 이를 조작하는 액션을 포함한 튜플이에요." | |
| :nested="[ | |
| { | |
| name: '[0]', | |
| type: \"Omit<Set<T>, 'add' | 'clear' | 'delete'>\", |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,47 +21,47 @@ function useSet<T>( | |||||||||||||||||||||||||||||
| ### Return Value | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| <Interface | ||||||||||||||||||||||||||||||
| name="" | ||||||||||||||||||||||||||||||
| type="[Set, SetActions]" | ||||||||||||||||||||||||||||||
| description="A tuple containing the Set state and actions to manipulate it." | ||||||||||||||||||||||||||||||
| :nested="[ | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[0]', | ||||||||||||||||||||||||||||||
| type: 'Omit<Set<T>, \"add\" | \"clear\" | \"delete\">', | ||||||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||||||
| description: 'The current Set state with mutation methods hidden.', | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[1].add', | ||||||||||||||||||||||||||||||
| type: '(value: T) => void', | ||||||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||||||
| description: 'Adds a value to the set.', | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[1].remove', | ||||||||||||||||||||||||||||||
| type: '(value: T) => void', | ||||||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||||||
| description: 'Removes a value from the set.', | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[1].toggle', | ||||||||||||||||||||||||||||||
| type: '(value: T) => void', | ||||||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||||||
| description: 'Adds the value if absent, removes it if present.', | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[1].setAll', | ||||||||||||||||||||||||||||||
| type: '(values: Set<T> | T[]) => void', | ||||||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||||||
| description: 'Replaces all values in the set.', | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[1].reset', | ||||||||||||||||||||||||||||||
| type: '() => void', | ||||||||||||||||||||||||||||||
| required: false, | ||||||||||||||||||||||||||||||
| description: 'Resets the set to its initial state.', | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| ]" | ||||||||||||||||||||||||||||||
| name="" | ||||||||||||||||||||||||||||||
| type="[Set, SetActions]" | ||||||||||||||||||||||||||||||
| description="A tuple containing the Set state and actions to manipulate it." | ||||||||||||||||||||||||||||||
| :nested="[ | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: '[0]', | ||||||||||||||||||||||||||||||
| type: 'Omit<Set<T>, add | clear | delete>', | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| type: 'Omit<Set<T>, add | clear | delete>', | |
| type: 'Omit<Set<T>, "add" | "clear" | "delete">', |
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return value type shown in the <Interface> component ([Set, SetActions]) doesn’t match the actual signature just above ([Omit<Set<T>, 'add' | 'clear' | 'delete'>, SetActions<T>]). Since this block is the primary “Return Value” type display, consider aligning it with the real return type (or using the same UseSetReturn<T> alias used in the implementation).
| type="[Set, SetActions]" | |
| description="A tuple containing the Set state and actions to manipulate it." | |
| :nested="[ | |
| { | |
| name: '[0]', | |
| type: 'Omit<Set<T>, add | clear | delete>', | |
| type="[Omit<Set<T>, 'add' | 'clear' | 'delete'>, SetActions<T>]" | |
| description="A tuple containing the Set state and actions to manipulate it." | |
| :nested="[ | |
| { | |
| name: '[0]', | |
| type: 'Omit<Set<T>, \'add\' | \'clear\' | \'delete\'>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반환 값의 nested 타입에서 Omit 키가 따옴표 없이 표시되고 있어요 (
add | clear | delete). 위 시그니처의 타입(Omit<Set<T>, 'add' | 'clear' | 'delete'>)과 불일치하고 TypeScript 표기법으로도 부정확합니다. Vue 파서 이슈를 피하면서 정확도를 유지하려면, 현재 single-quote 문자열 안에서 키만 double quote로 표기하는 방식(예:"add" | "clear" | "delete"형태를 백슬래시 없이)으로 맞춰 주세요.