Update LKG

This commit is contained in:
Mohamed Hegazy
2015-09-21 02:06:36 -07:00
parent 2477d1c7e4
commit c5a85c761f
8 changed files with 114 additions and 164 deletions

29
lib/lib.core.es6.d.ts vendored
View File

@@ -3965,7 +3965,34 @@ interface ObjectConstructor {
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param sources One or more source objects to copy properties from.
* @param source The source object from which to copy properties.
*/
assign<T, U>(target: T, source: U): T & U;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param source1 The first source object from which to copy properties.
* @param source2 The second source object from which to copy properties.
*/
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param source1 The first source object from which to copy properties.
* @param source2 The second source object from which to copy properties.
* @param source3 The third source object from which to copy properties.
*/
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param sources One or more source objects from which to copy properties
*/
assign(target: any, ...sources: any[]): any;

2
lib/lib.dom.d.ts vendored
View File

@@ -13192,4 +13192,4 @@ declare function addEventListener(type: "unload", listener: (ev: Event) => any,
declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;

29
lib/lib.es6.d.ts vendored
View File

@@ -3965,7 +3965,34 @@ interface ObjectConstructor {
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param sources One or more source objects to copy properties from.
* @param source The source object from which to copy properties.
*/
assign<T, U>(target: T, source: U): T & U;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param source1 The first source object from which to copy properties.
* @param source2 The second source object from which to copy properties.
*/
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param source1 The first source object from which to copy properties.
* @param source2 The second source object from which to copy properties.
* @param source3 The third source object from which to copy properties.
*/
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param sources One or more source objects from which to copy properties
*/
assign(target: any, ...sources: any[]): any;

View File

@@ -1199,4 +1199,4 @@ declare function postMessage(data: any): void;
declare var console: Console;
declare function addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;

View File

@@ -47,7 +47,6 @@ var ts;
})(ts.DiagnosticCategory || (ts.DiagnosticCategory = {}));
var DiagnosticCategory = ts.DiagnosticCategory;
})(ts || (ts = {}));
/// <reference path="types.ts"/>
var ts;
(function (ts) {
function createFileMap(getCanonicalFileName) {
@@ -569,9 +568,6 @@ var ts;
}
ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents;
function getNormalizedPathComponentsOfUrl(url) {
// Get root length of http://www.website.com/folder1/foler2/
// In this example the root is: http://www.website.com/
// normalized path components should be ["http://www.website.com/", "folder1", "folder2"]
var urlLength = url.length;
var rootLength = url.indexOf("://") + "://".length;
while (rootLength < urlLength) {
@@ -731,7 +727,6 @@ var ts;
Debug.fail = fail;
})(Debug = ts.Debug || (ts.Debug = {}));
})(ts || (ts = {}));
/// <reference path="core.ts"/>
var ts;
(function (ts) {
ts.sys = (function () {
@@ -1003,7 +998,6 @@ var ts;
}
})();
})(ts || (ts = {}));
/// <reference path="types.ts" />
var ts;
(function (ts) {
ts.Diagnostics = {
@@ -1624,8 +1618,6 @@ var ts;
A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A constructor cannot contain a 'super' call when its class extends 'null'" }
};
})(ts || (ts = {}));
/// <reference path="core.ts"/>
/// <reference path="diagnosticInformationMap.generated.ts"/>
var ts;
(function (ts) {
function tokenIsIdentifierOrKeyword(token) {
@@ -1879,16 +1871,6 @@ var ts;
}
ts.isWhiteSpace = isWhiteSpace;
function isLineBreak(ch) {
// ES5 7.3:
// The ECMAScript line terminator characters are listed in Table 3.
// Table 3: Line Terminator Characters
// Code Unit Value Name Formal Name
// \u000A Line Feed <LF>
// \u000D Carriage Return <CR>
// \u2028 Line separator <LS>
// \u2029 Paragraph separator <PS>
// Only the characters in Table 3 are treated as line terminators. Other new line or line
// breaking characters are treated as white space but not as line terminators.
return ch === 10 ||
ch === 13 ||
ch === 8232 ||
@@ -2990,7 +2972,6 @@ var ts;
}
ts.createScanner = createScanner;
})(ts || (ts = {}));
/// <reference path="parser.ts"/>
var ts;
(function (ts) {
ts.bindTime = 0;
@@ -3704,7 +3685,6 @@ var ts;
}
}
})(ts || (ts = {}));
/// <reference path="binder.ts" />
var ts;
(function (ts) {
function getDeclarationOfKind(symbol, kind) {
@@ -5653,8 +5633,6 @@ var ts;
}
ts.getTypeParameterOwner = getTypeParameterOwner;
})(ts || (ts = {}));
/// <reference path="scanner.ts"/>
/// <reference path="utilities.ts"/>
var ts;
(function (ts) {
var nodeConstructors = new Array(270);
@@ -6145,10 +6123,6 @@ var ts;
}
}
function fixupParentReferences(sourceFile) {
// normally parent references are set during binding. However, for clients that only need
// a syntax tree, and no semantic features, then the binding process is an unnecessary
// overhead. This functions allows us to set all the parents, without all the expense of
// binding.
var parent = sourceFile;
forEachChild(sourceFile, visitNode);
return;
@@ -7480,9 +7454,6 @@ var ts;
return allowInAnd(parseExpression);
}
function parseExpression() {
// Expression[in]:
// AssignmentExpression[in]
// Expression[in] , AssignmentExpression[in]
var saveDecoratorContext = inDecoratorContext();
if (saveDecoratorContext) {
setDecoratorContext(false);
@@ -7507,15 +7478,6 @@ var ts;
return parseAssignmentExpressionOrHigher();
}
function parseAssignmentExpressionOrHigher() {
// AssignmentExpression[in,yield]:
// 1) ConditionalExpression[?in,?yield]
// 2) LeftHandSideExpression = AssignmentExpression[?in,?yield]
// 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield]
// 4) ArrowFunctionExpression[?in,?yield]
// 5) [+Yield] YieldExpression[?In]
//
// Note: for ease of implementation we treat productions '2' and '3' as the same thing.
// (i.e. they're both BinaryExpressions with an assignment operator in it).
if (isYieldExpression()) {
return parseYieldExpression();
}
@@ -8484,8 +8446,6 @@ var ts;
return finishNode(node);
}
function parseThrowStatement() {
// ThrowStatement[Yield] :
// throw [no LineTerminator here]Expression[In, ?Yield];
var node = createNode(206);
parseExpected(96);
node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
@@ -9097,8 +9057,6 @@ var ts;
return finishNode(node);
}
function parseHeritageClauses(isClassHeritageClause) {
// ClassTail[Yield,Await] : (Modified) See 14.5
// ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt }
if (isHeritageClause()) {
return parseList(20, parseHeritageClause);
}
@@ -9265,12 +9223,6 @@ var ts;
return finishNode(importDeclaration);
}
function parseImportClause(identifier, fullStart) {
// ImportClause:
// ImportedDefaultBinding
// NameSpaceImport
// NamedImports
// ImportedDefaultBinding, NameSpaceImport
// ImportedDefaultBinding, NamedImports
var importClause = createNode(221, fullStart);
if (identifier) {
importClause.name = identifier;
@@ -10227,7 +10179,6 @@ var ts;
}
})(IncrementalParser || (IncrementalParser = {}));
})(ts || (ts = {}));
/// <reference path="binder.ts"/>
var ts;
(function (ts) {
var nextSymbolId = 1;
@@ -15562,8 +15513,8 @@ var ts;
}
}
function getContextuallyTypedParameterType(parameter) {
if (isFunctionExpressionOrArrowFunction(parameter.parent)) {
var func = parameter.parent;
var func = parameter.parent;
if (isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) {
if (isContextSensitive(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -18126,10 +18077,6 @@ var ts;
}
}
function checkParameter(node) {
// Grammar checking
// It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs as the
// Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code
// or if its FunctionBody is strict code(11.1.5).
checkGrammarDecorators(node) || checkGrammarModifiers(node);
checkVariableLikeDeclaration(node);
var func = ts.getContainingFunction(node);
@@ -18772,15 +18719,6 @@ var ts;
return type;
}
function getPromisedType(promise) {
//
// { // promise
// then( // thenFunction
// onfulfilled: ( // onfulfilledParameterType
// value: T // valueParameterType
// ) => any
// ): any;
// }
//
if (promise.flags & 1) {
return undefined;
}
@@ -19123,9 +19061,6 @@ var ts;
}
}
function checkVarDeclaredNamesNotShadowed(node) {
// - ScriptBody : StatementList
// It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList
// also occurs in the VarDeclaredNames of StatementList.
if ((ts.getCombinedNodeFlags(node) & 49152) !== 0 || ts.isParameterDeclaration(node)) {
return;
}
@@ -19801,19 +19736,6 @@ var ts;
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
}
function checkKindsOfPropertyMemberOverrides(type, baseType) {
// TypeScript 1.0 spec (April 2014): 8.2.3
// A derived class inherits all members from its base class it doesn't override.
// Inheritance means that a derived class implicitly contains all non - overridden members of the base class.
// Both public and private property members are inherited, but only public property members can be overridden.
// A property member in a derived class is said to override a property member in a base class
// when the derived class property member has the same name and kind(instance or static)
// as the base class property member.
// The type of an overriding property member must be assignable(section 3.8.4)
// to the type of the overridden property member, or otherwise a compile - time error occurs.
// Base class instance member functions can be overridden by derived class instance member functions,
// but not by other kinds of members.
// Base class instance member variables and accessors can be overridden by
// derived class instance member variables and accessors, but not by other kinds of members.
var baseProperties = getPropertiesOfObjectType(baseType);
for (var _i = 0; _i < baseProperties.length; _i++) {
var baseProperty = baseProperties[_i];
@@ -22347,7 +22269,6 @@ var ts;
}
ts.createTypeChecker = createTypeChecker;
})(ts || (ts = {}));
/// <reference path="checker.ts"/>
var ts;
(function (ts) {
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
@@ -23675,8 +23596,6 @@ var ts;
}
ts.writeDeclarationFile = writeDeclarationFile;
})(ts || (ts = {}));
/// <reference path="checker.ts"/>
/// <reference path="declarationEmitter.ts"/>
var ts;
(function (ts) {
function isExternalModuleOrDeclarationFile(sourceFile) {
@@ -24416,19 +24335,6 @@ var ts;
write(")");
}
function shouldEmitTemplateHead() {
// If this expression has an empty head literal and the first template span has a non-empty
// literal, then emitting the empty head literal is not necessary.
// `${ foo } and ${ bar }`
// can be emitted as
// foo + " and " + bar
// This is because it is only required that one of the first two operands in the emit
// output must be a string literal, so that the other operand and all following operands
// are forced into strings.
//
// If the first template span has an empty literal, then the head must still be emitted.
// `${ foo }${ bar }`
// must still be emitted as
// "" + foo + bar
ts.Debug.assert(node.templateSpans.length !== 0);
return node.head.text.length !== 0 || node.templateSpans[0].literal.text.length === 0;
}
@@ -24775,8 +24681,15 @@ var ts;
}
else if (declaration.kind === 224) {
write(getGeneratedNameForNode(declaration.parent.parent.parent));
write(".");
writeTextOfNode(currentSourceFile, declaration.propertyName || declaration.name);
var name = declaration.propertyName || declaration.name;
var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name);
if (languageVersion === 0 && identifier === "default") {
write("[\"default\"]");
}
else {
write(".");
write(identifier);
}
return;
}
}
@@ -25769,26 +25682,6 @@ var ts;
emitEmbeddedStatement(node.statement);
}
function emitDownLevelForOfStatement(node) {
// The following ES6 code:
//
// for (let v of expr) { }
//
// should be emitted as
//
// for (let _i = 0, _a = expr; _i < _a.length; _i++) {
// let v = _a[_i];
// }
//
// where _a and _i are temps emitted to capture the RHS and the counter,
// respectively.
// When the left hand side is an expression instead of a let declaration,
// the "let v" is not emitted.
// When the left hand side is a let/const, the v is renamed if there is
// another v in scope.
// Note that all assignments to the LHS are emitted in the body, including
// all destructuring.
// Note also that because an extra statement is needed to assign to the LHS,
// for-of bodies are always emitted as blocks.
var endPos = emitToken(84, node.pos);
write(" ");
endPos = emitToken(17, endPos);
@@ -28519,17 +28412,6 @@ var ts;
write("});");
}
function emitAMDDependencies(node, includeNonAmdDependencies) {
// An AMD define function has the following shape:
// define(id?, dependencies?, factory);
//
// This has the shape of
// define(name, ["module1", "module2"], function (module1Alias) {
// The location of the alias in the parameter list in the factory function needs to
// match the position of the module name in the dependency list.
//
// To ensure this is true in cases of modules with no aliases, e.g.:
// `import "module"` or `<amd-dependency path= "a.css" />`
// we need to add modules without alias names to the end of the dependencies list
var aliasedModuleNames = [];
var unaliasedModuleNames = [];
var importAliasNames = [];
@@ -29441,9 +29323,6 @@ var ts;
"diams": 0x2666
};
})(ts || (ts = {}));
/// <reference path="sys.ts" />
/// <reference path="emitter.ts" />
/// <reference path="core.ts" />
var ts;
(function (ts) {
ts.programTime = 0;
@@ -30288,10 +30167,6 @@ var ts;
}
ts.createProgram = createProgram;
})(ts || (ts = {}));
/// <reference path="sys.ts"/>
/// <reference path="types.ts"/>
/// <reference path="core.ts"/>
/// <reference path="scanner.ts"/>
var ts;
(function (ts) {
ts.optionDeclarations = [
@@ -30750,8 +30625,6 @@ var ts;
}
ts.parseConfigFile = parseConfigFile;
})(ts || (ts = {}));
/// <reference path="program.ts"/>
/// <reference path="commandLineParser.ts"/>
var ts;
(function (ts) {
function validateLocaleAndSetLanguage(locale, errors) {

View File

@@ -15971,8 +15971,8 @@ var ts;
}
}
function getContextuallyTypedParameterType(parameter) {
if (isFunctionExpressionOrArrowFunction(parameter.parent)) {
var func = parameter.parent;
var func = parameter.parent;
if (isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) {
if (isContextSensitive(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -25139,8 +25139,15 @@ var ts;
}
else if (declaration.kind === 224) {
write(getGeneratedNameForNode(declaration.parent.parent.parent));
write(".");
writeTextOfNode(currentSourceFile, declaration.propertyName || declaration.name);
var name = declaration.propertyName || declaration.name;
var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name);
if (languageVersion === 0 && identifier === "default") {
write("[\"default\"]");
}
else {
write(".");
write(identifier);
}
return;
}
}

View File

@@ -4954,6 +4954,7 @@ var ts;
}
})(ts || (ts = {}));
/// <reference path="binder.ts" />
/// <reference path="sys.ts" />
/* @internal */
var ts;
(function (ts) {
@@ -5083,16 +5084,16 @@ var ts;
return node.pos;
}
ts.getStartPosOfNode = getStartPosOfNode;
// Returns true if this node is missing from the actual source code. 'missing' is different
// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes
// in the tree), it is definitel missing. HOwever, a node may be defined, but still be
// Returns true if this node is missing from the actual source code. A 'missing' node is different
// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes
// in the tree), it is definitely missing. However, a node may be defined, but still be
// missing. This happens whenever the parser knows it needs to parse something, but can't
// get anything in the source code that it expects at that location. For example:
// get anything in the source code that it expects at that location. For example:
//
// let a: ;
//
// Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source
// code). So the parser will attempt to parse out a type, and will create an actual node.
// code). So the parser will attempt to parse out a type, and will create an actual node.
// However, this node will be 'missing' in the sense that no actual source-code/tokens are
// contained within it.
function nodeIsMissing(node) {
@@ -18922,8 +18923,8 @@ var ts;
}
// Return contextual type of parameter or undefined if no contextual type is available
function getContextuallyTypedParameterType(parameter) {
if (isFunctionExpressionOrArrowFunction(parameter.parent)) {
var func = parameter.parent;
var func = parameter.parent;
if (isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) {
if (isContextSensitive(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -29868,8 +29869,15 @@ var ts;
else if (declaration.kind === 224 /* ImportSpecifier */) {
// Identifier references named import
write(getGeneratedNameForNode(declaration.parent.parent.parent));
write(".");
writeTextOfNode(currentSourceFile, declaration.propertyName || declaration.name);
var name = declaration.propertyName || declaration.name;
var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name);
if (languageVersion === 0 /* ES3 */ && identifier === "default") {
write("[\"default\"]");
}
else {
write(".");
write(identifier);
}
return;
}
}

View File

@@ -4954,6 +4954,7 @@ var ts;
}
})(ts || (ts = {}));
/// <reference path="binder.ts" />
/// <reference path="sys.ts" />
/* @internal */
var ts;
(function (ts) {
@@ -5083,16 +5084,16 @@ var ts;
return node.pos;
}
ts.getStartPosOfNode = getStartPosOfNode;
// Returns true if this node is missing from the actual source code. 'missing' is different
// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes
// in the tree), it is definitel missing. HOwever, a node may be defined, but still be
// Returns true if this node is missing from the actual source code. A 'missing' node is different
// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes
// in the tree), it is definitely missing. However, a node may be defined, but still be
// missing. This happens whenever the parser knows it needs to parse something, but can't
// get anything in the source code that it expects at that location. For example:
// get anything in the source code that it expects at that location. For example:
//
// let a: ;
//
// Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source
// code). So the parser will attempt to parse out a type, and will create an actual node.
// code). So the parser will attempt to parse out a type, and will create an actual node.
// However, this node will be 'missing' in the sense that no actual source-code/tokens are
// contained within it.
function nodeIsMissing(node) {
@@ -18922,8 +18923,8 @@ var ts;
}
// Return contextual type of parameter or undefined if no contextual type is available
function getContextuallyTypedParameterType(parameter) {
if (isFunctionExpressionOrArrowFunction(parameter.parent)) {
var func = parameter.parent;
var func = parameter.parent;
if (isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) {
if (isContextSensitive(func)) {
var contextualSignature = getContextualSignature(func);
if (contextualSignature) {
@@ -29868,8 +29869,15 @@ var ts;
else if (declaration.kind === 224 /* ImportSpecifier */) {
// Identifier references named import
write(getGeneratedNameForNode(declaration.parent.parent.parent));
write(".");
writeTextOfNode(currentSourceFile, declaration.propertyName || declaration.name);
var name = declaration.propertyName || declaration.name;
var identifier = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, name);
if (languageVersion === 0 /* ES3 */ && identifier === "default") {
write("[\"default\"]");
}
else {
write(".");
write(identifier);
}
return;
}
}