-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
# Read this! | ||
|
||
The files within this directory are used to generate `lib.d.ts` and `lib.es6.d.ts`. | ||
The files within this directory are copied and deployed with TypeScript as the set of APIs available as a part of the JavaScript language. | ||
|
||
There are three main domains of APIs in `src/lib`: | ||
|
||
- **ECMAScript language features** - e.g. JavaScript APIs like functions on Array etc which are documented in [ECMA-262](https://tc39.es/ecma262/) | ||
- **DOM APIs** - e.g. APIs which are available in Web Browsers | ||
- **Intl APIs** - e.g. APIs scoped to `Intl` which are documented in [ECMA-402](https://www.ecma-international.org/publications-and-standards/standards/ecma-402/) | ||
|
||
Finished proposals, anything in here can safely be added according to the years the proposal was added: | ||
|
||
- [JavaScript](https://github.com/tc39/proposals/blob/master/finished-proposals.md) | ||
- [Intl](https://github.com/tc39/proposals/blob/master/ecma402/finished-proposals.md) | ||
|
||
## How do we figure out when to add something? | ||
|
||
TypeScript has a rule-of-thumb to only add something when it has got far enough through the standards process that it is more or less confirmed. For JavaScript APIs and language features, that usually means the proposal is at stage 3 or later. | ||
|
||
For the DOM APIs, which are a bit more free-form we have ask that APIs are available (un-prefixed/flagged) in at least 2 browser _engines_ (e.g. not just 2 chromium browsers.) | ||
|
||
## Generated files | ||
|
||
Any files ending in `.generated.d.ts` aren't meant to be edited by hand. | ||
The DOM files ending in `.generated.d.ts` aren't meant to be edited by hand. | ||
|
||
If you need to make changes to such files, make a change to the input files for [**our library generator**](https://github.com/Microsoft/TSJS-lib-generator). |