-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Conversation
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep 🍰
const newLine = getNewLineCharacter(options); | ||
|
||
return { | ||
getSourceFile, | ||
getDefaultLibLocation, | ||
getDefaultLibFileName: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), getDefaultLibFileName(options)), |
There was a problem hiding this comment.
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)),
``
👍 |
…ft/TypeScript into 6974AddLibImplementation # Conflicts: # src/harness/harness.ts
@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 CC @alexeagle |
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.