Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6974 add lib implementation #7715

Merged
merged 23 commits into from
Mar 30, 2016
Merged

6974 add lib implementation #7715

merged 23 commits into from
Mar 30, 2016

Conversation

yuit
Copy link
Contributor

@yuit yuit commented Mar 28, 2016

This PR extract only implementation of the PR #7452 (which include symbol baselines that make it hard to review). Symbol baselines will be updated in a separate PR which will merge in here once both are approved to be merged into master branch.

Kanchalai Tanglertsampan added 6 commits March 28, 2016 13:49
Separate ES6 library feature-by-feature into smaller files

Break ES6 library

Remove unused ES6

Rename core to es5

Update building library files in JakeFile

separate symbol into its own file

separate well-known symbol into its own file

remove iterable and symbol component from es6.string.d.ts

remove iterable and symbol components from es6.collection.d.ts

remove symbol components from es6.math.d.ts

remove iterable and symbol components from es6.object.d.ts

remove iterable and symbol components from es6.promise.d.ts

remove iterable and symbol component from es6.reflect.d.ts

remove iterable and symbol components from es6.proxy.d.ts

split regexp into its own file

remove unused file

rename es7 array-include d.ts file

Include new lib files into compilation

Move symbol.iterable to symbol.wellknown

Move functions/methods that use propertyKey back to its original interface

Rename dome.es6 to dom.iterable
Take dependency on dom.generated.d.ts

Rename importcore.d.ts to importes5.d.ts

Add es6.d.ts and es7.d.ts that contain /// references to their associated sub-features files

Update library compilation

Fix harness broken from renaming generated library files

Remove intl.d.ts
Remove preset lib files

Use lib.full.es6.d.ts instead of lib.es6.d.ts

Add intl.d.ts to es5.d.ts

Remove unused RegexpConstructor interface

Separate generator into its own file

Update Jakefile

Remove iterable-iterator dependence

Use lower case for lib filename

Include no-default comment

Remove newline on top of the file
Add --lib compiler tests and baselines

Remove old compiler baselines
let getGlobalESSymbolType: () => ObjectType;
let getGlobalIterableType: () => GenericType;
let getGlobalIteratorType: () => GenericType;
let getGlobalIterableIteratorType: () => GenericType;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly is the reason these are lazy again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we don't want to give an error even when you don't use any of these feature. For example, if you code only use es6-array features and you specify --lib es2015.array you should not get an error of "can't find 'Symbol' or 'Iterator'": Being lazy allows us to do that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great! Can you leave that comment above these declarations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep 🍰

This was referenced Mar 29, 2016
const newLine = getNewLineCharacter(options);

return {
getSourceFile,
getDefaultLibLocation,
getDefaultLibFileName: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), getDefaultLibFileName(options)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would change this to be:

combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
``

@mhegazy
Copy link
Contributor

mhegazy commented Mar 29, 2016

👍

@jeffbcross
Copy link

@yuit would you be opposed to publishing individual definitions to DefinitelyTyped? We could use it on angular2 to be compatible with new versions of RxJS that require Symbol and Iterable to be present.

CC @alexeagle

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants