vue-options-api-best-practices
vuejs-ai/skills
Vue 3 Options API의 모범 사례, TypeScript 통합 팁, 그리고 자주 발생하는 문제점에 대한 해결책을 제공합니다.
...모든 것을 확장하십시오Vue.js Options API 모범 사례, TypeScript 통합 및 자주 발생하는 함정.
TypeScript
- 컴포넌트 속성에 대해 TypeScript 타입 추론을 활성화해야 함 → ts-options-api-use-define-component 참조
- Options API this 컨텍스트에서 타입 안전성 활성화 → ts-strict-mode-options-api 참조
- prop 유효성 검사기와 함께 구버전 TypeScript 사용 → ts-options-api-arrow-functions-validators 참조
- 이벤트 핸들러 매개변수에 적절한 타입 안전성이 필요합니다 → ts-options-api-type-event-handlers 참조
- 인터페이스를 사용하여 객체 또는 배열 프로퍼티의 타입을 지정해야 함 → ts-options-api-proptype-complex-types 참조
- 주입된 속성에 TypeScript 타입이 완전히 누락됨 → ts-options-api-provide-inject-limitations 참조
- 복잡한 계산 속성에 대한 명확한 타입 문서화가 부족함 → ts-options-api-computed-return-types 참조
메서드 및 라이프사이클
- 메서드가 컴포넌트 인스턴스 컨텍스트에 바인딩되지 않음 → no-arrow-functions-in-methods 참조
- 라이프사이클 훅에서 컴포넌트 데이터에 대한 액세스 권한 상실 → no-arrow-functions-in-lifecycle-hooks 참조
- 디바운싱된 함수가 컴포넌트 인스턴스 간에 상태를 공유함 → stateful-methods-lifecycle 참조
---
name: vue-options-api-best-practices
description: Provides Vue 3 Options API best practices, TypeScript integration tips, and solutions to common gotchas.
license: MIT
---
Vue.js Options API best practices, TypeScript integration, and common gotchas.
### TypeScript
- Need to enable TypeScript type inference for component properties → See [ts-options-api-use-definecomponent](reference/ts-options-api-use-definecomponent.md)
- Enabling type safety for Options API this context → See [ts-strict-mode-options-api](reference/ts-strict-mode-options-api.md)
- Using old TypeScript versions with prop validators → See [ts-options-api-arrow-functions-validators](reference/ts-options-api-arrow-functions-validators.md)
- Event handler parameters need proper type safety → See [ts-options-api-type-event-handlers](reference/ts-options-api-type-event-handlers.md)
- Need to type object or array props with interfaces → See [ts-options-api-proptype-complex-types](reference/ts-options-api-proptype-complex-types.md)
- Injected properties missing TypeScript types completely → See [ts-options-api-provide-inject-limitations](reference/ts-options-api-provide-inject-limitations.md)
- Complex computed properties lack clear type documentation → See [ts-options-api-computed-return-types](reference/ts-options-api-computed-return-types.md)
### Methods & Lifecycle
- Methods aren't binding to component instance context → See [no-arrow-functions-in-methods](reference/no-arrow-functions-in-methods.md)
- Lifecycle hooks losing access to component data → See [no-arrow-functions-in-lifecycle-hooks](reference/no-arrow-functions-in-lifecycle-hooks.md)
- Debounced functions sharing state across component instances → See [stateful-methods-lifecycle](reference/stateful-methods-lifecycle.md)
모든 파일
11개 파일vue-options-api-best-practices 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/vuejs-ai/skills/tree/main/skills/vue-options-api-best-practices # Copy SKILL.md to your .claude/skills/ directory
복사





집
