TypeScript/tests/baselines/reference/library_ObjectPrototypeProperties.types
Anders Hejlsberg 6aeb8c12cc
Preserve type aliases for union and intersection types (#42149)
* Create separate types for equivalent aliased unions

* Accept new baselines

* Preserve original types for union types

* Accept new baselines

* Preserve intersection origin for union types

* Accept new baselines

* Accept new baselines

* Preserve aliases during relationship checks

* Accept new baselines

* Preserve aliases for intersection and indexed access types

* Accept new baselines

* Compute intersection-of-unions cross product without recursion

* Accept new baselines

* Use denormalized type objects for origin / support 'keyof' origins

* Accept new baselines

* Fix fourslash test

* Recursively extract named union types

* Accept new baselines

* Map on union origin in mapType to better preserve aliases and origins

* Remove redundant call

* Accept new baselines

* Revert back to declared type when branches produce equivalent union

* Accept new baselines

* Don't include denormal origin types in regular type statistics

* Fix issue with unions not being marked primitive-only

* Allow new alias to be associated with type alias instantiation

* Accept new baselines

* Revert "Accept new baselines"

This reverts commit 4507270cc1.

* Revert "Allow new alias to be associated with type alias instantiation"

This reverts commit 2c2d06dfe1.
2021-01-08 15:19:58 -10:00

62 lines
1.9 KiB
Plaintext

=== tests/cases/compiler/library_ObjectPrototypeProperties.ts ===
// Properties of the Object Prototype Object as per ES5 spec
// http://www.ecma-international.org/ecma-262/5.1/#sec-15.2.4
Object.prototype.constructor;
>Object.prototype.constructor : Function
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>constructor : Function
Object.prototype.toString();
>Object.prototype.toString() : string
>Object.prototype.toString : () => string
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>toString : () => string
Object.prototype.toLocaleString();
>Object.prototype.toLocaleString() : string
>Object.prototype.toLocaleString : () => string
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>toLocaleString : () => string
Object.prototype.valueOf();
>Object.prototype.valueOf() : Object
>Object.prototype.valueOf : () => Object
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>valueOf : () => Object
Object.prototype.hasOwnProperty("string");
>Object.prototype.hasOwnProperty("string") : boolean
>Object.prototype.hasOwnProperty : (v: PropertyKey) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>hasOwnProperty : (v: PropertyKey) => boolean
>"string" : "string"
Object.prototype.isPrototypeOf(Object);
>Object.prototype.isPrototypeOf(Object) : boolean
>Object.prototype.isPrototypeOf : (v: Object) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>isPrototypeOf : (v: Object) => boolean
>Object : ObjectConstructor
Object.prototype.propertyIsEnumerable("string");
>Object.prototype.propertyIsEnumerable("string") : boolean
>Object.prototype.propertyIsEnumerable : (v: PropertyKey) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>propertyIsEnumerable : (v: PropertyKey) => boolean
>"string" : "string"