Typescript: μ˜ˆμ•½ ν‚€μ›Œλ“œ λͺ©λ‘

에 λ§Œλ“  2015λ…„ 03μ›” 28일  Β·  5μ½”λ©˜νŠΈ  Β·  좜처: microsoft/TypeScript

Typescript에 λŒ€ν•œ μ˜ˆμ•½μ–΄ λͺ©λ‘μ΄ μ–΄λ”˜κ°€μ— μžˆμŠ΅λ‹ˆκΉŒ? λ‚˜λŠ” λ‘˜λŸ¬ λ³΄μ•˜μ§€λ§Œ μ–Έμ–΄ 사양 μ—μ„œλ„ 찾을 수 μ—†μ—ˆμŠ΅λ‹ˆλ‹€.

Question

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

ES6 사양을 μ°Έμ‘°ν•˜μ—¬ λΆ€λΆ„ λͺ©λ‘ 을 νŒŒμ•…ν•  수 μžˆμ§€λ§Œ ν˜„μž¬ λͺ©λ‘ 의 μ½”λ“œλ‘œ 직접 μ΄λ™ν•˜λŠ” 것이 더 λ‚˜μ„ 수 μžˆμŠ΅λ‹ˆλ‹€. TS 사양 (@ahejlsberg)의 μΌλΆ€λ‘œ 전체 λͺ©λ‘μ„ μœ μ§€ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

μ½”λ“œλ₯Ό 기반으둜 λ‹€μŒκ³Ό 같이 μ •λ¦¬ν–ˆμŠ΅λ‹ˆλ‹€.

| μ˜ˆμ•½μ–΄ | Strict λͺ¨λ“œ μ˜ˆμ•½μ–΄ | λ¬Έλ§₯ ν‚€μ›Œλ“œ |
| --- | --- | --- |
| break | as | any |
| case | implements | boolean |
| catch | interface | constructor |
| class | let | declare |
| const | package | get |
| continue | private | module |
| debugger | protected | require |
| default | public | number |
| delete | static | set |
| do | yield | string |
| else | symbol | |
| enum | type | |
| export | from | |
| extends | of | |
| false | | |
| finally | | |
| for | | |
| function | | |
| if | | |
| import | | |
| in | | |
| instanceof | | |
| new | | |
| null | | |
| return | | |
| super | | |
| switch | | |
| this | | |
| throw | | |
| true | | |
| try | | |
| typeof | | |
| var | | |
| void | | |
| while | | |
| with | | |

더 μ‰½κ²Œ λ³΅μ‚¬ν•˜λ €λ©΄ λ‹€μŒμ„ μˆ˜ν–‰ν•˜μ‹­μ‹œμ˜€.

| μ˜ˆμ•½μ–΄ |
| --- |
| break |
| case |
| catch |
| class |
| const |
| continue |
| debugger |
| default |
| delete |
| do |
| else |
| enum |
| export |
| extends |
| false |
| finally |
| for |
| function |
| if |
| import |
| in |
| instanceof |
| new |
| null |
| return |
| super |
| switch |
| this |
| throw |
| true |
| try |
| typeof |
| var |
| void |
| while |
| with |

| Strict λͺ¨λ“œ μ˜ˆμ•½μ–΄ |
| --- |
| as |
| implements |
| interface |
| let |
| package |
| private |
| protected |
| public |
| static |
| yield |

| λ¬Έλ§₯ ν‚€μ›Œλ“œ |
| --- |
| any |
| boolean |
| constructor |
| declare |
| get |
| module |
| require |
| number |
| set |
| string |
| symbol |
| type |
| from |
| of |

λͺ¨λ“  5 λŒ“κΈ€

ES6 사양을 μ°Έμ‘°ν•˜μ—¬ λΆ€λΆ„ λͺ©λ‘ 을 νŒŒμ•…ν•  수 μžˆμ§€λ§Œ ν˜„μž¬ λͺ©λ‘ 의 μ½”λ“œλ‘œ 직접 μ΄λ™ν•˜λŠ” 것이 더 λ‚˜μ„ 수 μžˆμŠ΅λ‹ˆλ‹€. TS 사양 (@ahejlsberg)의 μΌλΆ€λ‘œ 전체 λͺ©λ‘μ„ μœ μ§€ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

μ½”λ“œλ₯Ό 기반으둜 λ‹€μŒκ³Ό 같이 μ •λ¦¬ν–ˆμŠ΅λ‹ˆλ‹€.

| μ˜ˆμ•½μ–΄ | Strict λͺ¨λ“œ μ˜ˆμ•½μ–΄ | λ¬Έλ§₯ ν‚€μ›Œλ“œ |
| --- | --- | --- |
| break | as | any |
| case | implements | boolean |
| catch | interface | constructor |
| class | let | declare |
| const | package | get |
| continue | private | module |
| debugger | protected | require |
| default | public | number |
| delete | static | set |
| do | yield | string |
| else | symbol | |
| enum | type | |
| export | from | |
| extends | of | |
| false | | |
| finally | | |
| for | | |
| function | | |
| if | | |
| import | | |
| in | | |
| instanceof | | |
| new | | |
| null | | |
| return | | |
| super | | |
| switch | | |
| this | | |
| throw | | |
| true | | |
| try | | |
| typeof | | |
| var | | |
| void | | |
| while | | |
| with | | |

더 μ‰½κ²Œ λ³΅μ‚¬ν•˜λ €λ©΄ λ‹€μŒμ„ μˆ˜ν–‰ν•˜μ‹­μ‹œμ˜€.

| μ˜ˆμ•½μ–΄ |
| --- |
| break |
| case |
| catch |
| class |
| const |
| continue |
| debugger |
| default |
| delete |
| do |
| else |
| enum |
| export |
| extends |
| false |
| finally |
| for |
| function |
| if |
| import |
| in |
| instanceof |
| new |
| null |
| return |
| super |
| switch |
| this |
| throw |
| true |
| try |
| typeof |
| var |
| void |
| while |
| with |

| Strict λͺ¨λ“œ μ˜ˆμ•½μ–΄ |
| --- |
| as |
| implements |
| interface |
| let |
| package |
| private |
| protected |
| public |
| static |
| yield |

| λ¬Έλ§₯ ν‚€μ›Œλ“œ |
| --- |
| any |
| boolean |
| constructor |
| declare |
| get |
| module |
| require |
| number |
| set |
| string |
| symbol |
| type |
| from |
| of |

λ˜ν•œ namespace , μ•„λ§ˆλ„ async 및 await .

@DanielRosenwasser λŠ” μœ„ν‚€ νŽ˜μ΄μ§€κ°€ μžˆμ–΄μ•Όν•©λ‹ˆλ‹€.

Typescript Playground μ—μ„œ 여기에 μ–ΈκΈ‰ 된 λͺ‡ 가지 μ˜ˆλΉ„ 단어λ₯Ό μ‹œλ„ν–ˆμ§€λ§Œ λ¬Έμ œκ°€ λ°œμƒν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. IMO, ν‚€μ›Œλ“œλŠ” 적어도 ES6의 ν‚€μ›Œλ“œμ™€ μΌμΉ˜ν•΄μ•Όν•©λ‹ˆλ‹€. λ‚˜μ€‘μ— MDN μ‚¬μ΄νŠΈμ—μ„œ λ§Œλ“  λͺ©λ‘ 인 https://github.com/crissdev/is-keyword-js/blob/master/index.js λͺ©λ‘μ΄ μžˆμŠ΅λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰