문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| typescript:deep:type [2019/11/23 04:24] – [Solution 2 - Function] taekgu | typescript:deep:type [2025/04/15 10:05] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 45: | 줄 45: | ||
| Now, as your projets goes on, you have whole idea of what's going on there. So you can go back and modify your declaration to a more precise version using the fancy arrow function syntax, feel free to use it, it maked as ' | Now, as your projets goes on, you have whole idea of what's going on there. So you can go back and modify your declaration to a more precise version using the fancy arrow function syntax, feel free to use it, it maked as ' | ||
| + | 이제, 당신의 프로젝트가 진행됨에 따라, 당신은 거기에 대한 전체를 알고 있다. 그래서 당신은 뒤로 돌아가 당신의 선언를 연습버젼에서 화려한 화살표 함수문법으로 수정할 수 있다. 화살표함수는 ECMA2015에서 표준이 되었다. | ||
| < | < | ||
| let a: (para: string) => string; | let a: (para: string) => string; | ||
| 줄 54: | 줄 55: | ||
| The syntax here is very simple, it is just like the lambda function in Java or C#, the ' | The syntax here is very simple, it is just like the lambda function in Java or C#, the ' | ||
| + | 여기 문법은 매우 단순하고, | ||
| ==== Solution 4 - Use type ==== | ==== Solution 4 - Use type ==== | ||
| We can use '' | We can use '' | ||
| + | |||
| + | '' | ||
| < | < | ||
| 줄 68: | 줄 72: | ||
| We are Typescript, we'd love to use the beloved '' | We are Typescript, we'd love to use the beloved '' | ||
| + | 우리는 타입스크립트에서는, | ||
| < | < | ||
| interface read { | interface read { | ||
| 줄 78: | 줄 83: | ||
| ==== Summary ==== | ==== Summary ==== | ||
| - | In pratice, I often use '' | + | In pratice, I often use '' |
| + | 경험적으로 나는 4번 Type을 선호한다. 아마도 '' | ||