Skip to content

Commit 917bb42

Browse files
committed
update: structurize project and append quotes
1 parent 60ee5e8 commit 917bb42

File tree

2 files changed

+34
-22
lines changed

2 files changed

+34
-22
lines changed

README.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,46 @@
66
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
77
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
88

9-
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
109

11-
Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/).
10+
## Goal
11+
1. Compatible with all JavaScript syntax, and extend the syntax based on JS;
12+
2. Statically analyze the code to find the code that is likely to have BUG;
13+
3. Generate pure JavaScript code without any optimization or processing of the code, **even errors in the source code are retained in the generated code**;
14+
3. **Does not affect the runtime environment of the generated code**.
1215

13-
## Installing
1416

15-
For the latest stable version:
16-
17-
```bash
18-
npm install -g typescript
17+
## Project structure
18+
```
19+
├── bin # the final tsc and tsserver commands for users
20+
├── doc # language specification document
21+
├── lib # system standard library and localization of prompt information, LKG
22+
├── loc
23+
│ └── lcl # error message localization
24+
├── scripts # tool scripts when developing projects
25+
├── src # source code
26+
│ ├── compiler # compiler source code
27+
│ │ ├── transformers # transformers with different target syntax
28+
│ │ ├── scanner.ts # grammar analysis: scan a single file, lexical analysis
29+
│ │ ├── parser.ts # grammar analysis: get tokens to generate AST tree, syntax analysis
30+
│ │ ├── binder.ts # semantic analysis: analysis scope, create symbol table; analysis process, create flow diagram
31+
│ │ ├── checker.ts # semantic analysis: type checking, do semantic analysis
32+
│ │ ├── transformer.ts # optimization generation: syntax conversion and polyfill
33+
│ │ ├── emitter.ts # optimization generation: JS code generation
34+
│ │ ├── system.ts # tools: OE
35+
│ │ └── types.ts # tools: key data structures and interfaces
36+
│ └── services # language service, mainly used by VSCode. Searching for definitions and other functions
37+
└── tests # test
1938
```
2039

21-
For our nightly builds:
40+
![compile diagram](./asset/158732-20200113115412762-1000035138.png)
2241

23-
```bash
24-
npm install -g typescript@next
25-
```
42+
## More Info
43+
44+
* [microsoft/TypeScript/README](https://github.com/microsoft/TypeScript/blob/master/README.md)
45+
* [Language specification](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md)
46+
* [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap)
47+
* [TypeScript 源码详细解读](https://www.cnblogs.com/xuld/p/12180913.html)
48+
* [TypeScript Deep Dive](https://basarat.gitbook.io/typescript/)
2649

2750
## Contribute
2851

@@ -40,12 +63,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
4063
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected])
4164
with any additional questions or comments.
4265

43-
## Documentation
44-
45-
* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
46-
* [Programming handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html)
47-
* [Language specification](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md)
48-
* [Homepage](https://www.typescriptlang.org/)
4966

5067
## Building
5168

@@ -100,8 +117,3 @@ gulp help # List the above commands.
100117
```bash
101118
node built/local/tsc.js hello.ts
102119
```
103-
104-
105-
## Roadmap
106-
107-
For details on our planned features and future direction please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
201 KB
Loading

0 commit comments

Comments
 (0)