docs(core): fix useSet Interface component parsing error#361
docs(core): fix useSet Interface component parsing error#361
Conversation
Remove escaped double quotes in :nested attribute that caused Vue template parser to terminate the attribute value prematurely. Also fix missing indentation for consistent formatting.
There was a problem hiding this comment.
Pull request overview
Fixes a VitePress/Vue template parsing error on the useSet documentation pages by adjusting the <Interface> component’s :nested attribute formatting in both EN and KO docs.
Changes:
- Reformat
<Interface>props for consistent indentation. - Adjust
:nestedattribute content to avoid the Vue template parser error (previously triggered by escaped quotes).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/core/src/hooks/useSet/useSet.md | Reformats <Interface> return-value block and updates :nested content to prevent VitePress parsing errors. |
| packages/core/src/hooks/useSet/ko/useSet.md | Same change as EN version for the KO documentation page. |
| :nested="[ | ||
| { | ||
| name: '[0]', | ||
| type: 'Omit<Set<T>, add | clear | delete>', |
There was a problem hiding this comment.
In the nested return type, the omitted keys are missing quotes (add | clear | delete). This no longer matches the hook signature above (Omit<Set<T>, 'add' | 'clear' | 'delete'>) and is not valid TypeScript syntax when presented to users. Consider using double-quoted keys inside the existing single-quoted string (e.g., "add" | "clear" | "delete" without backslashes) so the docs remain accurate while still avoiding the Vue template parsing issue.
| type: 'Omit<Set<T>, add | clear | delete>', | |
| type: 'Omit<Set<T>, "add" | "clear" | "delete">', |
| :nested="[ | ||
| { | ||
| name: '[0]', | ||
| type: 'Omit<Set<T>, add | clear | delete>', |
There was a problem hiding this comment.
반환 값의 nested 타입에서 Omit 키가 따옴표 없이 표시되고 있어요 (add | clear | delete). 위 시그니처의 타입(Omit<Set<T>, 'add' | 'clear' | 'delete'>)과 불일치하고 TypeScript 표기법으로도 부정확합니다. Vue 파서 이슈를 피하면서 정확도를 유지하려면, 현재 single-quote 문자열 안에서 키만 double quote로 표기하는 방식(예: "add" | "clear" | "delete" 형태를 백슬래시 없이)으로 맞춰 주세요.
| type: 'Omit<Set<T>, add | clear | delete>', | |
| type: 'Omit<Set<T>, "add" | "clear" | "delete">', |
| 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>', |
There was a problem hiding this comment.
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\'>', |
| type="[Set, SetActions]" | ||
| description="Set 상태와 이를 조작하는 액션을 포함한 튜플이에요." | ||
| :nested="[ | ||
| { | ||
| name: '[0]', | ||
| type: 'Omit<Set<T>, add | clear | delete>', |
There was a problem hiding this comment.
반환 값 <Interface>의 type이 [Set, SetActions]로 되어 있는데, 위 시그니처의 실제 반환 타입([Omit<Set<T>, 'add' | 'clear' | 'delete'>, SetActions<T>])과 달라요. 이 섹션이 반환 타입을 대표해서 보여주는 만큼, 실제 타입(또는 구현에서 쓰는 UseSetReturn<T> 별칭)과 일치시키는 게 좋습니다.
| 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'>\", |
Summary
Fix VitePress build error (
Unterminated string constant) on useSet documentation pageRemove escaped double quotes (
\") in:nestedattribute that caused the Vue template parser to prematurely terminate the attribute valueFix missing indentation in
<Interface>component for consistent formattingbefore
Test plan
useSetpage renders correctly on the documentation site (both EN and KO)