Skip to content

Commit

Permalink
Update LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
mhegazy committed Feb 2, 2017
1 parent 207f1aa commit adedc19
Show file tree
Hide file tree
Showing 19 changed files with 38,202 additions and 36,022 deletions.
4 changes: 2 additions & 2 deletions lib/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ interface ObjectConstructor {
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
*/
create<T>(o: T): T;
create<T extends object>(o: T): T;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
* @param properties JavaScript object that contains one or more property descriptors.
*/
create(o: any, properties: PropertyDescriptorMap): any;
create(o: object | null, properties: PropertyDescriptorMap): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
Expand Down
8 changes: 4 additions & 4 deletions lib/lib.es2015.collection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Map<K, V> {
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value?: V): this;
set(key: K, value: V): this;
readonly size: number;
}

Expand All @@ -42,16 +42,16 @@ interface ReadonlyMap<K, V> {
readonly size: number;
}

interface WeakMap<K, V> {
interface WeakMap<K extends object, V> {
delete(key: K): boolean;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value?: V): this;
set(key: K, value: V): this;
}

interface WeakMapConstructor {
new (): WeakMap<any, any>;
new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
readonly prototype: WeakMap<any, any>;
}
declare var WeakMap: WeakMapConstructor;
Expand Down
2 changes: 1 addition & 1 deletion lib/lib.es2015.core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ interface ObjectConstructor {
* @param o The object to change its prototype.
* @param proto The value of the new prototype or null.
*/
setPrototypeOf(o: any, proto: any): any;
setPrototypeOf(o: any, proto: object | null): any;

/**
* Gets the own property descriptor of the specified object.
Expand Down
6 changes: 3 additions & 3 deletions lib/lib.es2015.iterable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ interface MapConstructor {
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
}

interface WeakMap<K, V> { }
interface WeakMap<K extends object, V> { }

interface WeakMapConstructor {
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
}

interface Set<T> {
Expand Down Expand Up @@ -462,4 +462,4 @@ interface Float64ArrayConstructor {
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
}
}
4 changes: 2 additions & 2 deletions lib/lib.es2015.proxy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and limitations under the License.


interface ProxyHandler<T> {
getPrototypeOf? (target: T): {} | null;
getPrototypeOf? (target: T): object | null;
setPrototypeOf? (target: T, v: any): boolean;
isExtensible? (target: T): boolean;
preventExtensions? (target: T): boolean;
Expand All @@ -32,7 +32,7 @@ interface ProxyHandler<T> {
enumerate? (target: T): PropertyKey[];
ownKeys? (target: T): PropertyKey[];
apply? (target: T, thisArg: any, argArray?: any): any;
construct? (target: T, argArray: any, newTarget?: any): {};
construct? (target: T, argArray: any, newTarget?: any): object
}

interface ProxyConstructor {
Expand Down
2 changes: 1 addition & 1 deletion lib/lib.es2015.symbol.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface Symbol {
toString(): string;

/** Returns the primitive value of the specified object. */
valueOf(): Object;
valueOf(): symbol;
}

interface SymbolConstructor {
Expand Down
4 changes: 2 additions & 2 deletions lib/lib.es2015.symbol.wellknown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ interface Map<K, V> {
readonly [Symbol.toStringTag]: "Map";
}

interface WeakMap<K, V>{
interface WeakMap<K extends object, V>{
readonly [Symbol.toStringTag]: "WeakMap";
}

Expand Down Expand Up @@ -344,4 +344,4 @@ interface Float32Array {
*/
interface Float64Array {
readonly [Symbol.toStringTag]: "Float64Array";
}
}
4 changes: 2 additions & 2 deletions lib/lib.es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ interface ObjectConstructor {
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
*/
create<T>(o: T): T;
create<T extends object>(o: T): T;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
* @param properties JavaScript object that contains one or more property descriptors.
*/
create(o: any, properties: PropertyDescriptorMap): any;
create(o: object | null, properties: PropertyDescriptorMap): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
Expand Down
28 changes: 15 additions & 13 deletions lib/lib.es6.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ interface ObjectConstructor {
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
*/
create<T>(o: T): T;
create<T extends object>(o: T): T;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
* @param properties JavaScript object that contains one or more property descriptors.
*/
create(o: any, properties: PropertyDescriptorMap): any;
create(o: object | null, properties: PropertyDescriptorMap): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
Expand Down Expand Up @@ -4523,7 +4523,7 @@ interface ObjectConstructor {
* @param o The object to change its prototype.
* @param proto The value of the new prototype or null.
*/
setPrototypeOf(o: any, proto: any): any;
setPrototypeOf(o: any, proto: object | null): any;

/**
* Gets the own property descriptor of the specified object.
Expand Down Expand Up @@ -4728,7 +4728,7 @@ interface Map<K, V> {
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value?: V): this;
set(key: K, value: V): this;
readonly size: number;
}

Expand All @@ -4746,16 +4746,16 @@ interface ReadonlyMap<K, V> {
readonly size: number;
}

interface WeakMap<K, V> {
interface WeakMap<K extends object, V> {
delete(key: K): boolean;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value?: V): this;
set(key: K, value: V): this;
}

interface WeakMapConstructor {
new (): WeakMap<any, any>;
new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
readonly prototype: WeakMap<any, any>;
}
declare var WeakMap: WeakMapConstructor;
Expand Down Expand Up @@ -4911,10 +4911,10 @@ interface MapConstructor {
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
}

interface WeakMap<K, V> { }
interface WeakMap<K extends object, V> { }

interface WeakMapConstructor {
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
}

interface Set<T> {
Expand Down Expand Up @@ -5256,6 +5256,7 @@ interface Float64ArrayConstructor {
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
}


/**
* Represents the completion of an asynchronous operation
*/
Expand Down Expand Up @@ -5512,7 +5513,7 @@ interface PromiseConstructor {
declare var Promise: PromiseConstructor;

interface ProxyHandler<T> {
getPrototypeOf? (target: T): {} | null;
getPrototypeOf? (target: T): object | null;
setPrototypeOf? (target: T, v: any): boolean;
isExtensible? (target: T): boolean;
preventExtensions? (target: T): boolean;
Expand All @@ -5525,7 +5526,7 @@ interface ProxyHandler<T> {
enumerate? (target: T): PropertyKey[];
ownKeys? (target: T): PropertyKey[];
apply? (target: T, thisArg: any, argArray?: any): any;
construct? (target: T, argArray: any, newTarget?: any): {};
construct? (target: T, argArray: any, newTarget?: any): object
}

interface ProxyConstructor {
Expand Down Expand Up @@ -5556,7 +5557,7 @@ interface Symbol {
toString(): string;

/** Returns the primitive value of the specified object. */
valueOf(): Object;
valueOf(): symbol;
}

interface SymbolConstructor {
Expand Down Expand Up @@ -5700,7 +5701,7 @@ interface Map<K, V> {
readonly [Symbol.toStringTag]: "Map";
}

interface WeakMap<K, V>{
interface WeakMap<K extends object, V>{
readonly [Symbol.toStringTag]: "WeakMap";
}

Expand Down Expand Up @@ -5917,6 +5918,7 @@ interface Float64Array {
}



/////////////////////////////
/// IE DOM APIs
/////////////////////////////
Expand Down
8 changes: 7 additions & 1 deletion lib/protocol.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1798,9 +1798,10 @@ declare namespace ts.server.protocol {
namespace JsxEmit {
type None = "None";
type Preserve = "Preserve";
type ReactNative = "ReactNative";
type React = "React";
}
type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React;
type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React | JsxEmit.ReactNative;
namespace ModuleKind {
type None = "None";
type CommonJS = "CommonJS";
Expand Down Expand Up @@ -1862,6 +1863,11 @@ declare namespace ts.server.protocol {
isMixedContent: boolean;
}

/**
* Type of objects whose values are all of the same type.
* The `in` and `for-in` operators can *not* be safely used,
* since `Object.prototype` may be modified by outside code.
*/
interface MapLike<T> {
[index: string]: T;
}
Expand Down
Loading

0 comments on commit adedc19

Please sign in to comment.