Skip to content

Commit fae15c3

Browse files
committed
Official sync translation: /guide/typescript/options-api.md
- #1853: 오역 수정
1 parent 4734227 commit fae15c3

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

ko-KR/src/guide/typescript/options-api.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,10 @@ export default defineComponent({
8484
})
8585
```
8686

87-
### Caveats
88-
### 주의사항 {#caveats2}
87+
### 주의사항 {#caveats}
8988

90-
Because of a [design limitation](https://github.com/microsoft/TypeScript/issues/38845) in TypeScript, you have to be careful when using function values for `validator` and `default` prop options - make sure to use arrow functions:
91-
92-
타입스크립트의 4.7 버전 이하를 사용하신다면 `validator``default` prop 옵션에 대한 함수 값을 사용할 때 주의해야 합니다. 화살표 함수를 사용 하세요.
89+
타입스크립트의 4.7 버전 미만을 사용하신다면 `validator``default` prop 옵션에 함수 값을 사용할 때 주의해야 합니다.
90+
화살표 함수를 사용해야 합니다:
9391

9492
```ts
9593
import { defineComponent } from 'vue'
@@ -104,7 +102,7 @@ export default defineComponent({
104102
props: {
105103
bookA: {
106104
type: Object as PropType<Book>,
107-
// Make sure to use arrow functions if your TypeScript version is less than 4.7
105+
// 타입스크립트 4.7 버전 미만인 경우 반드시 화살표 함수를 사용해야 함.
108106
default: () => ({
109107
title: 'Arrow Function Expression'
110108
}),
@@ -114,9 +112,9 @@ export default defineComponent({
114112
})
115113
```
116114

117-
This prevents TypeScript from having to infer the type of `this` inside these functions, which, unfortunately, can cause the type inference to fail.
118-
119-
이렇게 하면 타입스크립트가 함수 내에서 `this` 형식을 유추할 필요가 없으므로 타입 추론에 실패할 수 있습니다. 이것은 과거의 [설계 제약](https://github.com/microsoft/TypeScript/issues/38845) 때문에 발생한 일이고, [4.7버전](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#improved-function-inference-in-objects-and-methods) 에서 개선 되었습니다.
115+
이렇게 하면 타입스크립트가 이러한 함수 내에서 `this` 유형 유추에 실패하는 것을 방지할 수 있습니다.
116+
이것은 과거의 [설계적 한계](https://github.com/microsoft/TypeScript/issues/38845) 때문에 발생한 현상으로,
117+
[4.7버전](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#improved-function-inference-in-objects-and-methods)에서 개선 되었습니다.
120118

121119
## Typing Component Emits
122120
## 컴포넌트 Emits 작성 {#typing-component-emits2}

0 commit comments

Comments
 (0)