Skip to content

docs(core): fix useSet Interface component parsing error#361

Open
guesung wants to merge 1 commit intotoss:mainfrom
guesung:docs/fix-useset-interface-parsing
Open

docs(core): fix useSet Interface component parsing error#361
guesung wants to merge 1 commit intotoss:mainfrom
guesung:docs/fix-useset-interface-parsing

Conversation

@guesung
Copy link
Copy Markdown
Contributor

@guesung guesung commented Apr 1, 2026

Summary

  • Fix VitePress build error (Unterminated string constant) on useSet documentation page

  • Remove escaped double quotes (\") in :nested attribute that caused the Vue template parser to prematurely terminate the attribute value

  • Fix missing indentation in <Interface> component for consistent formatting

  • before

image
  • after
image image

Test plan

  • Verify useSet page renders correctly on the documentation site (both EN and KO)
  • Confirm no VitePress build errors

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.
Copilot AI review requested due to automatic review settings April 1, 2026 06:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :nested attribute 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>',
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
type: 'Omit<Set<T>, add | clear | delete>',
type: 'Omit<Set<T>, "add" | "clear" | "delete">',

Copilot uses AI. Check for mistakes.
:nested="[
{
name: '[0]',
type: 'Omit<Set<T>, add | clear | delete>',
Copy link

Copilot AI Apr 1, 2026

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" 형태를 백슬래시 없이)으로 맞춰 주세요.

Suggested change
type: 'Omit<Set<T>, add | clear | delete>',
type: 'Omit<Set<T>, "add" | "clear" | "delete">',

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +30
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>',
Copy link

Copilot AI Apr 1, 2026

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).

Suggested change
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\'>',

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +30
type="[Set, SetActions]"
description="Set 상태와 이를 조작하는 액션을 포함한 튜플이에요."
:nested="[
{
name: '[0]',
type: 'Omit<Set<T>, add | clear | delete>',
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반환 값 <Interface>type[Set, SetActions]로 되어 있는데, 위 시그니처의 실제 반환 타입([Omit<Set<T>, 'add' | 'clear' | 'delete'>, SetActions<T>])과 달라요. 이 섹션이 반환 타입을 대표해서 보여주는 만큼, 실제 타입(또는 구현에서 쓰는 UseSetReturn<T> 별칭)과 일치시키는 게 좋습니다.

Suggested change
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'>\",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants