mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-13 23:48:54 -05:00
Remove extra overload
This commit is contained in:
6
src/lib/es5.d.ts
vendored
6
src/lib/es5.d.ts
vendored
@@ -136,12 +136,6 @@ interface ObjectConstructor {
|
||||
*/
|
||||
getOwnPropertyNames(o: any): string[];
|
||||
|
||||
/**
|
||||
* Creates an object that has the specified prototype.
|
||||
* @param o Object to use as a prototype.
|
||||
*/
|
||||
create<T extends object>(o: T): T;
|
||||
|
||||
/**
|
||||
* Creates an object that has the specified prototype or that has null prototype.
|
||||
* @param o Object to use as a prototype. May be null.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/assigningFromObjectToAnythingElse.ts(3,1): error TS2322: Type 'Object' is not assignable to type 'RegExp'.
|
||||
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
|
||||
Property 'exec' is missing in type 'Object'.
|
||||
tests/cases/compiler/assigningFromObjectToAnythingElse.ts(5,5): error TS2322: Type 'Object' is not assignable to type 'String'.
|
||||
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
|
||||
Property 'charAt' is missing in type 'Object'.
|
||||
tests/cases/compiler/assigningFromObjectToAnythingElse.ts(6,5): error TS2322: Type 'Number' is not assignable to type 'String'.
|
||||
Property 'charAt' is missing in type 'Number'.
|
||||
tests/cases/compiler/assigningFromObjectToAnythingElse.ts(5,5): error TS2322: Type 'object | Object' is not assignable to type 'String'.
|
||||
Type 'object' is not assignable to type 'String'.
|
||||
Property 'charAt' is missing in type '{}'.
|
||||
tests/cases/compiler/assigningFromObjectToAnythingElse.ts(6,5): error TS2322: Type 'object | Number' is not assignable to type 'String'.
|
||||
Type 'object' is not assignable to type 'String'.
|
||||
tests/cases/compiler/assigningFromObjectToAnythingElse.ts(8,5): error TS2322: Type 'Object' is not assignable to type 'Error'.
|
||||
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
|
||||
Property 'name' is missing in type 'Object'.
|
||||
@@ -22,13 +22,13 @@ tests/cases/compiler/assigningFromObjectToAnythingElse.ts(8,5): error TS2322: Ty
|
||||
|
||||
var a: String = Object.create<Object>("");
|
||||
~
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'String'.
|
||||
!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
|
||||
!!! error TS2322: Property 'charAt' is missing in type 'Object'.
|
||||
!!! error TS2322: Type 'object | Object' is not assignable to type 'String'.
|
||||
!!! error TS2322: Type 'object' is not assignable to type 'String'.
|
||||
!!! error TS2322: Property 'charAt' is missing in type '{}'.
|
||||
var c: String = Object.create<Number>(1);
|
||||
~
|
||||
!!! error TS2322: Type 'Number' is not assignable to type 'String'.
|
||||
!!! error TS2322: Property 'charAt' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'object | Number' is not assignable to type 'String'.
|
||||
!!! error TS2322: Type 'object' is not assignable to type 'String'.
|
||||
|
||||
var w: Error = new Object();
|
||||
~
|
||||
|
||||
@@ -7,67 +7,67 @@ declare var union: null | { a: number, b: string };
|
||||
|
||||
var n = Object.create(null); // object
|
||||
>n : Symbol(n, Decl(objectCreate.ts, 3, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||||
>t : Symbol(t, Decl(objectCreate.ts, 4, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 4, 23))
|
||||
>b : Symbol(b, Decl(objectCreate.ts, 4, 29))
|
||||
|
||||
var u = Object.create(union); // object | {a: number, b: string }
|
||||
>u : Symbol(u, Decl(objectCreate.ts, 5, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>union : Symbol(union, Decl(objectCreate.ts, 1, 11))
|
||||
|
||||
var e = Object.create({}); // {}
|
||||
>e : Symbol(e, Decl(objectCreate.ts, 6, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var o = Object.create(<object>{}); // object
|
||||
>o : Symbol(o, Decl(objectCreate.ts, 7, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var a = Object.create(null, {}); // any
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 9, 3), Decl(objectCreate.ts, 10, 3), Decl(objectCreate.ts, 11, 3), Decl(objectCreate.ts, 12, 3), Decl(objectCreate.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var a = Object.create({ a: 1, b: "" }, {});
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 9, 3), Decl(objectCreate.ts, 10, 3), Decl(objectCreate.ts, 11, 3), Decl(objectCreate.ts, 12, 3), Decl(objectCreate.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 10, 23))
|
||||
>b : Symbol(b, Decl(objectCreate.ts, 10, 29))
|
||||
|
||||
var a = Object.create(union, {});
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 9, 3), Decl(objectCreate.ts, 10, 3), Decl(objectCreate.ts, 11, 3), Decl(objectCreate.ts, 12, 3), Decl(objectCreate.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>union : Symbol(union, Decl(objectCreate.ts, 1, 11))
|
||||
|
||||
var a = Object.create({}, {});
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 9, 3), Decl(objectCreate.ts, 10, 3), Decl(objectCreate.ts, 11, 3), Decl(objectCreate.ts, 12, 3), Decl(objectCreate.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var a = Object.create(<object>{}, {});
|
||||
>a : Symbol(a, Decl(objectCreate.ts, 9, 3), Decl(objectCreate.ts, 10, 3), Decl(objectCreate.ts, 11, 3), Decl(objectCreate.ts, 12, 3), Decl(objectCreate.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -9,17 +9,17 @@ declare var union: null | { a: number, b: string };
|
||||
var n = Object.create(null); // object
|
||||
>n : object
|
||||
>Object.create(null) : object
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>null : null
|
||||
|
||||
var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||||
>t : { a: number; b: string; }
|
||||
>Object.create({ a: 1, b: "" }) : { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>t : object | { a: number; b: string; }
|
||||
>Object.create({ a: 1, b: "" }) : object | { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>{ a: 1, b: "" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
@@ -29,43 +29,43 @@ var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||||
var u = Object.create(union); // object | {a: number, b: string }
|
||||
>u : object | { a: number; b: string; }
|
||||
>Object.create(union) : object | { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>union : { a: number; b: string; } | null
|
||||
|
||||
var e = Object.create({}); // {}
|
||||
>e : {}
|
||||
>Object.create({}) : {}
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>e : object | {}
|
||||
>Object.create({}) : object | {}
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>{} : {}
|
||||
|
||||
var o = Object.create(<object>{}); // object
|
||||
>o : object
|
||||
>Object.create(<object>{}) : object
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
><object>{} : object
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create(null, {}); // any
|
||||
>a : any
|
||||
>Object.create(null, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>null : null
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create({ a: 1, b: "" }, {});
|
||||
>a : any
|
||||
>Object.create({ a: 1, b: "" }, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>{ a: 1, b: "" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
@@ -76,27 +76,27 @@ var a = Object.create({ a: 1, b: "" }, {});
|
||||
var a = Object.create(union, {});
|
||||
>a : any
|
||||
>Object.create(union, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>union : { a: number; b: string; } | null
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create({}, {});
|
||||
>a : any
|
||||
>Object.create({}, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>{} : {}
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create(<object>{}, {});
|
||||
>a : any
|
||||
>Object.create(<object>{}, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T | null): object | T; (o: object | null, properties: PropertyDescriptorMap): any; }
|
||||
><object>{} : object
|
||||
>{} : {}
|
||||
>{} : {}
|
||||
|
||||
@@ -7,67 +7,67 @@ declare var union: null | { a: number, b: string };
|
||||
|
||||
var n = Object.create(null); // any
|
||||
>n : Symbol(n, Decl(objectCreate2.ts, 3, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||||
>t : Symbol(t, Decl(objectCreate2.ts, 4, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 4, 23))
|
||||
>b : Symbol(b, Decl(objectCreate2.ts, 4, 29))
|
||||
|
||||
var u = Object.create(union); // {a: number, b: string }
|
||||
>u : Symbol(u, Decl(objectCreate2.ts, 5, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>union : Symbol(union, Decl(objectCreate2.ts, 1, 11))
|
||||
|
||||
var e = Object.create({}); // {}
|
||||
>e : Symbol(e, Decl(objectCreate2.ts, 6, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var o = Object.create(<object>{}); // object
|
||||
>o : Symbol(o, Decl(objectCreate2.ts, 7, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var a = Object.create(null, {}); // any
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 9, 3), Decl(objectCreate2.ts, 10, 3), Decl(objectCreate2.ts, 11, 3), Decl(objectCreate2.ts, 12, 3), Decl(objectCreate2.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var a = Object.create({ a: 1, b: "" }, {});
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 9, 3), Decl(objectCreate2.ts, 10, 3), Decl(objectCreate2.ts, 11, 3), Decl(objectCreate2.ts, 12, 3), Decl(objectCreate2.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 10, 23))
|
||||
>b : Symbol(b, Decl(objectCreate2.ts, 10, 29))
|
||||
|
||||
var a = Object.create(union, {});
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 9, 3), Decl(objectCreate2.ts, 10, 3), Decl(objectCreate2.ts, 11, 3), Decl(objectCreate2.ts, 12, 3), Decl(objectCreate2.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>union : Symbol(union, Decl(objectCreate2.ts, 1, 11))
|
||||
|
||||
var a = Object.create({}, {});
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 9, 3), Decl(objectCreate2.ts, 10, 3), Decl(objectCreate2.ts, 11, 3), Decl(objectCreate2.ts, 12, 3), Decl(objectCreate2.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var a = Object.create(<object>{}, {});
|
||||
>a : Symbol(a, Decl(objectCreate2.ts, 9, 3), Decl(objectCreate2.ts, 10, 3), Decl(objectCreate2.ts, 11, 3), Decl(objectCreate2.ts, 12, 3), Decl(objectCreate2.ts, 13, 3))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>create : Symbol(ObjectConstructor.create, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -9,17 +9,17 @@ declare var union: null | { a: number, b: string };
|
||||
var n = Object.create(null); // any
|
||||
>n : any
|
||||
>Object.create(null) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>null : null
|
||||
|
||||
var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||||
>t : { a: number; b: string; }
|
||||
>Object.create({ a: 1, b: "" }) : { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>t : object | { a: number; b: string; }
|
||||
>Object.create({ a: 1, b: "" }) : object | { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>{ a: 1, b: "" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
@@ -27,45 +27,45 @@ var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||||
>"" : ""
|
||||
|
||||
var u = Object.create(union); // {a: number, b: string }
|
||||
>u : { a: number; b: string; }
|
||||
>Object.create(union) : { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>u : object | { a: number; b: string; }
|
||||
>Object.create(union) : object | { a: number; b: string; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>union : { a: number; b: string; }
|
||||
|
||||
var e = Object.create({}); // {}
|
||||
>e : {}
|
||||
>Object.create({}) : {}
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>e : object | {}
|
||||
>Object.create({}) : object | {}
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>{} : {}
|
||||
|
||||
var o = Object.create(<object>{}); // object
|
||||
>o : object
|
||||
>Object.create(<object>{}) : object
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
><object>{} : object
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create(null, {}); // any
|
||||
>a : any
|
||||
>Object.create(null, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>null : null
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create({ a: 1, b: "" }, {});
|
||||
>a : any
|
||||
>Object.create({ a: 1, b: "" }, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>{ a: 1, b: "" } : { a: number; b: string; }
|
||||
>a : number
|
||||
>1 : 1
|
||||
@@ -76,27 +76,27 @@ var a = Object.create({ a: 1, b: "" }, {});
|
||||
var a = Object.create(union, {});
|
||||
>a : any
|
||||
>Object.create(union, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>union : { a: number; b: string; }
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create({}, {});
|
||||
>a : any
|
||||
>Object.create({}, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>{} : {}
|
||||
>{} : {}
|
||||
|
||||
var a = Object.create(<object>{}, {});
|
||||
>a : any
|
||||
>Object.create(<object>{}, {}) : any
|
||||
>Object.create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object.create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>Object : ObjectConstructor
|
||||
>create : { <T extends object>(o: T): T; <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
>create : { <T extends object>(o: T): object | T; (o: object, properties: PropertyDescriptorMap): any; }
|
||||
><object>{} : object
|
||||
>{} : {}
|
||||
>{} : {}
|
||||
|
||||
Reference in New Issue
Block a user