TypeScript Language Specification Version 1.8 January, 2016 Microsoft is making this Specification available under the Open Web Foundation Final Specification Agreement Version 1.0 ("OWF 1.0") as of October 1, 2012. The OWF 1.0 is available at http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. TypeScript is a trademark of Microsoft Corporation. Table of Contents 1 2 Introduction ................................................................................................................................................................................... 1 1.1 Ambient Declarations ..................................................................................................................................................... 3 1.2 Function Types .................................................................................................................................................................. 3 1.3 Object Types ...................................................................................................................................................................... 4 1.4 Structural Subtyping ....................................................................................................................................................... 6 1.5 Contextual Typing ............................................................................................................................................................ 7 1.6 Classes .................................................................................................................................................................................. 8 1.7 Enum Types ..................................................................................................................................................................... 10 1.8 Overloading on String Parameters......................................................................................................................... 12 1.9 Generic Types and Functions ................................................................................................................................... 12 1.10 Namespaces .................................................................................................................................................................... 14 1.11 Modules ............................................................................................................................................................................ 16 Basic Concepts .......................................................................................................................................................................... 17 2.1 Grammar Conventions ................................................................................................................................................ 17 2.2 Names ................................................................................................................................................................................ 17 2.2.1 Reserved Words ........................................................................................................................................................ 18 2.2.2 Property Names ........................................................................................................................................................ 18 2.2.3 3 Computed Property Names ................................................................................................................................. 19 2.3 Declarations..................................................................................................................................................................... 19 2.4 Scopes ............................................................................................................................................................................... 22 Types ............................................................................................................................................................................................. 25 3.1 The Any Type .................................................................................................................................................................. 26 3.2 Primitive Types ....................................
TypeScript Language Specification
温馨提示:如果当前文档出现乱码或未能正常浏览,请先下载原文档进行浏览。
本文档由 user 于 2020-12-27 09:02:17上传分享