Accept new baselines

This commit is contained in:
Anders Hejlsberg
2018-04-09 07:48:13 -10:00
parent 68ce69a351
commit 2c02195560
43 changed files with 251 additions and 203 deletions
+2 -1
View File
@@ -2095,7 +2095,7 @@ declare namespace ts {
Unit = 13536,
StringOrNumberLiteral = 96,
PossiblyFalsy = 14574,
StringLike = 524322,
StringLike = 34,
NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
@@ -2332,6 +2332,7 @@ declare namespace ts {
inlineSources?: boolean;
isolatedModules?: boolean;
jsx?: JsxEmit;
keyofStringsOnly?: boolean;
lib?: string[];
locale?: string;
mapRoot?: string;
+2 -1
View File
@@ -2095,7 +2095,7 @@ declare namespace ts {
Unit = 13536,
StringOrNumberLiteral = 96,
PossiblyFalsy = 14574,
StringLike = 524322,
StringLike = 34,
NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
@@ -2332,6 +2332,7 @@ declare namespace ts {
inlineSources?: boolean;
isolatedModules?: boolean;
jsx?: JsxEmit;
keyofStringsOnly?: boolean;
lib?: string[];
locale?: string;
mapRoot?: string;
@@ -17,9 +17,9 @@ var r = c.toString();
var r2 = c.hasOwnProperty('');
>r2 : boolean
>c.hasOwnProperty('') : boolean
>c.hasOwnProperty : (v: string) => boolean
>c.hasOwnProperty : (v: string | number | symbol) => boolean
>c : C
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'' : ""
var o: Object = c;
@@ -1689,7 +1689,7 @@ declare module Immutable {
export interface Class<T extends Object> {
>Class : Symbol(Class, Decl(immutable.ts, 214, 70))
>T : Symbol(T, Decl(immutable.ts, 215, 27))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
(values?: Partial<T> | Iterable<[string, any]>): Instance<T> & Readonly<T>;
>values : Symbol(values, Decl(immutable.ts, 216, 7))
@@ -1714,7 +1714,7 @@ declare module Immutable {
export interface Instance<T extends Object> {
>Instance : Symbol(Instance, Decl(immutable.ts, 218, 5))
>T : Symbol(T, Decl(immutable.ts, 219, 30))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
readonly size: number;
>size : Symbol(Instance.size, Decl(immutable.ts, 219, 49))
@@ -2005,7 +2005,7 @@ declare module Immutable {
toJS(): Object;
>toJS : Symbol(Keyed.toJS, Decl(immutable.ts, 269, 76))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
toJSON(): { [key: string]: V };
>toJSON : Symbol(Keyed.toJSON, Decl(immutable.ts, 270, 21))
@@ -2594,7 +2594,7 @@ declare module Immutable {
toJS(): Object;
>toJS : Symbol(Keyed.toJS, Decl(immutable.ts, 340, 59))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
toJSON(): { [key: string]: V };
>toJSON : Symbol(Keyed.toJSON, Decl(immutable.ts, 341, 21))
@@ -20,22 +20,32 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2
Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'keyof T' is not assignable to type 'never'.
Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'keyof T' is not assignable to type 'never'.
Type 'string' is not assignable to type 'never'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'Pick<T, { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]>' is not assignable to type 'Pick<T, { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]>'.
Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'keyof T' is not assignable to type 'never'.
Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'keyof T' is not assignable to type 'never'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(114,5): error TS2322: Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(115,5): error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
@@ -43,8 +53,12 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(115,5): error TS2
Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
Type 'keyof T' is not assignable to type 'never'.
Type 'string' is not assignable to type 'never'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(116,5): error TS2322: Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(117,5): error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
@@ -207,11 +221,15 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
!!! error TS2322: Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
!!! error TS2322: Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
!!! error TS2322: Type 'string' is not assignable to type 'never'.
z = x;
z = y; // Error
~
@@ -219,11 +237,14 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
!!! error TS2322: Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
!!! error TS2322: Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
}
function f8<T>(x: keyof T, y: FunctionPropertyNames<T>, z: NonFunctionPropertyNames<T>) {
@@ -232,7 +253,10 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
y = x; // Error
~
!!! error TS2322: Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
y = z; // Error
~
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]'.
@@ -242,10 +266,14 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'never'.
!!! error TS2322: Type 'string' is not assignable to type 'never'.
z = x; // Error
~
!!! error TS2322: Type 'keyof T' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'string' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
z = y; // Error
~
!!! error TS2322: Type '{ [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]' is not assignable to type '{ [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]'.
@@ -6,6 +6,7 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(24,5): error TS23
Types of property 'foo' are incompatible.
Type 'B extends string ? keyof B : B' is not assignable to type 'A extends string ? keyof A : A'.
Type 'keyof B' is not assignable to type 'keyof A'.
Type 'string' is not assignable to type 'keyof A'.
tests/cases/conformance/types/conditional/conditionalTypes2.ts(25,5): error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
Types of property 'foo' are incompatible.
Type 'A extends string ? keyof A : A' is not assignable to type 'B extends string ? keyof B : B'.
@@ -60,6 +61,7 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2
!!! error TS2322: Types of property 'foo' are incompatible.
!!! error TS2322: Type 'B extends string ? keyof B : B' is not assignable to type 'A extends string ? keyof A : A'.
!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'.
!!! error TS2322: Type 'string' is not assignable to type 'keyof A'.
b = a; // Error
~
!!! error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
@@ -371,11 +371,11 @@ export class StyleParser {
if (!this.styles.hasOwnProperty(key)) {
>!this.styles.hasOwnProperty(key) : boolean
>this.styles.hasOwnProperty(key) : boolean
>this.styles.hasOwnProperty : (v: string) => boolean
>this.styles.hasOwnProperty : (v: string | number | symbol) => boolean
>this.styles : {}
>this : this
>styles : {}
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>key : string
}
}
@@ -2,7 +2,7 @@
declare function dec(target: Object, propertyKey: string | symbol, parameterIndex: number): void;
>dec : Symbol(dec, Decl(decoratorOnClassMethodParameter1.es6.ts, 0, 0))
>target : Symbol(target, Decl(decoratorOnClassMethodParameter1.es6.ts, 0, 21))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethodParameter1.es6.ts, 0, 36))
>parameterIndex : Symbol(parameterIndex, Decl(decoratorOnClassMethodParameter1.es6.ts, 0, 66))
@@ -3,7 +3,7 @@ function x(o: object, k: PropertyKey) { }
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>o : Symbol(o, Decl(decoratorsOnComputedProperties.ts, 0, 11))
>k : Symbol(k, Decl(decoratorsOnComputedProperties.ts, 0, 21))
>PropertyKey : Symbol(PropertyKey, Decl(lib.es2015.core.d.ts, --, --))
>PropertyKey : Symbol(PropertyKey, Decl(lib.es5.d.ts, --, --))
let i = 0;
>i : Symbol(i, Decl(decoratorsOnComputedProperties.ts, 1, 3))
@@ -1,9 +1,9 @@
=== tests/cases/compiler/decoratorsOnComputedProperties.ts ===
function x(o: object, k: PropertyKey) { }
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>o : object
>k : PropertyKey
>PropertyKey : PropertyKey
>k : string | number | symbol
>PropertyKey : string | number | symbol
let i = 0;
>i : number
@@ -32,25 +32,25 @@ class A {
>A : A
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -85,13 +85,13 @@ class A {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -102,12 +102,12 @@ class A {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -119,25 +119,25 @@ void class B {
>B : typeof B
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -172,13 +172,13 @@ void class B {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -189,12 +189,12 @@ void class B {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -205,25 +205,25 @@ class C {
>C : C
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -258,13 +258,13 @@ class C {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -275,12 +275,12 @@ class C {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -298,25 +298,25 @@ void class D {
>D : typeof D
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -351,13 +351,13 @@ void class D {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -368,12 +368,12 @@ void class D {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -390,25 +390,25 @@ class E {
>E : E
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -443,13 +443,13 @@ class E {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -466,12 +466,12 @@ class E {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -483,25 +483,25 @@ void class F {
>F : typeof F
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -536,13 +536,13 @@ void class F {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -559,12 +559,12 @@ void class F {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -575,25 +575,25 @@ class G {
>G : G
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -628,13 +628,13 @@ class G {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -651,7 +651,7 @@ class G {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@@ -662,7 +662,7 @@ class G {
>"method2" : "method2"
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -674,25 +674,25 @@ void class H {
>H : typeof H
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -727,13 +727,13 @@ void class H {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@@ -750,7 +750,7 @@ void class H {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@@ -761,7 +761,7 @@ void class H {
>"method2" : "method2"
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -772,25 +772,25 @@ class I {
>I : I
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -825,20 +825,20 @@ class I {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
>null : null
@x ["some" + "method"]() {}
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["some" + "method"] : () => void
>"some" + "method" : string
>"some" : "some"
@@ -849,7 +849,7 @@ class I {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@@ -860,7 +860,7 @@ class I {
>"method2" : "method2"
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -872,25 +872,25 @@ void class J {
>J : typeof J
@x ["property"]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property"] : any
>"property" : "property"
@x [Symbol.toStringTag]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.toStringTag] : any
>Symbol.toStringTag : symbol
>Symbol : SymbolConstructor
>toStringTag : symbol
@x ["property2"]: any = 2;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["property2"] : any
>"property2" : "property2"
>2 : 2
@x [Symbol.iterator]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[Symbol.iterator] : any
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
@@ -925,20 +925,20 @@ void class J {
>foo : () => string
@x [foo()]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
@x [foo()]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[foo()] : any
>foo() : string
>foo : () => string
>null : null
@x ["some" + "method"]() {}
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>["some" + "method"] : () => void
>"some" + "method" : string
>"some" : "some"
@@ -949,7 +949,7 @@ void class J {
>fieldNameA : string
@x [fieldNameB]: any;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameB] : any
>fieldNameB : string
@@ -960,7 +960,7 @@ void class J {
>"method2" : "method2"
@x [fieldNameC]: any = null;
>x : (o: object, k: PropertyKey) => void
>x : (o: object, k: string | number | symbol) => void
>[fieldNameC] : any
>fieldNameC : string
>null : null
@@ -4,9 +4,9 @@
// Excess property error expected here
Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false });
>Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false }) : any
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>Object : ObjectConstructor
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>window : any
>"prop" : "prop"
>{ value: "v1.0.0", readonly: false } : { value: string; readonly: boolean; }
@@ -1068,12 +1068,12 @@ define(function () {
};
var hasOwnProp = Object.prototype.hasOwnProperty,
>hasOwnProp : (v: string) => boolean
>Object.prototype.hasOwnProperty : (v: string) => boolean
>hasOwnProp : (v: string | number | symbol) => boolean
>Object.prototype.hasOwnProperty : (v: string | number | symbol) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
isArray;
>isArray : any
@@ -1249,7 +1249,7 @@ define(function () {
if (hasOwnProp.call(object, key)) {
>hasOwnProp.call(object, key) : any
>hasOwnProp.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProp : (v: string) => boolean
>hasOwnProp : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>object : any
>key : string
@@ -1296,7 +1296,7 @@ define(function () {
if (hasOwnProp.call(mobileDetectRules.props, key)) {
>hasOwnProp.call(mobileDetectRules.props, key) : any
>hasOwnProp.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProp : (v: string) => boolean
>hasOwnProp : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>mobileDetectRules.props : any
>mobileDetectRules : any
@@ -1487,7 +1487,7 @@ define(function () {
if (hasOwnProp.call(rules, key)) {
>hasOwnProp.call(rules, key) : any
>hasOwnProp.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProp : (v: string) => boolean
>hasOwnProp : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>rules : any
>key : string
@@ -1538,7 +1538,7 @@ define(function () {
if (hasOwnProp.call(rules, key)) {
>hasOwnProp.call(rules, key) : any
>hasOwnProp.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProp : (v: string) => boolean
>hasOwnProp : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>rules : any
>key : string
@@ -1598,7 +1598,7 @@ define(function () {
if (hasOwnProp.call(props, propertyName)) {
>hasOwnProp.call(props, propertyName) : any
>hasOwnProp.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProp : (v: string) => boolean
>hasOwnProp : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>props : any
>propertyName : any
@@ -9,9 +9,9 @@ function setFunc(v){}
Object.defineProperty({}, "0", <PropertyDescriptor>({
>Object.defineProperty({}, "0", <PropertyDescriptor>({ get: getFunc, set: setFunc, configurable: true })) : any
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>Object : ObjectConstructor
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>{} : {}
>"0" : "0"
><PropertyDescriptor>({ get: getFunc, set: setFunc, configurable: true }) : PropertyDescriptor
@@ -125,14 +125,14 @@ interface P {
}
type NonIndexableUnion2 = string | number;
>NonIndexableUnion2 : NonIndexableUnion2
>NonIndexableUnion2 : string | number
interface Q {
>Q : Q
[u: NonIndexableUnion2]: A;
>u : NonIndexableUnion2
>NonIndexableUnion2 : NonIndexableUnion2
>u : string | number
>NonIndexableUnion2 : string | number
>A : A
}
@@ -28,7 +28,9 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(76,5): error
Type 'T' is not assignable to type 'U'.
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(77,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof (T | U)'.
Type 'keyof T' is not assignable to type 'keyof (T | U)'.
Type 'string' is not assignable to type 'keyof (T | U)'.
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(86,9): error TS2322: Type 'keyof T' is not assignable to type 'K'.
Type 'string' is not assignable to type 'K'.
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(88,9): error TS2322: Type 'T[keyof T]' is not assignable to type 'T[K]'.
Type 'keyof T' is not assignable to type 'K'.
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(91,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
@@ -38,6 +40,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(94,5): error
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(97,5): error TS2322: Type 'T[K]' is not assignable to type 'T[J]'.
Type 'K' is not assignable to type 'J'.
Type 'keyof T' is not assignable to type 'J'.
Type 'string' is not assignable to type 'J'.
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(100,5): error TS2322: Type 'T[K]' is not assignable to type 'U[J]'.
Type 'T' is not assignable to type 'U'.
@@ -175,6 +178,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(100,5): error
~~
!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof (T | U)'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof (T | U)'.
!!! error TS2322: Type 'string' is not assignable to type 'keyof (T | U)'.
k2 = k1;
}
@@ -186,6 +190,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(100,5): error
k = key // error, keyof T =/=> K
~
!!! error TS2322: Type 'keyof T' is not assignable to type 'K'.
!!! error TS2322: Type 'string' is not assignable to type 'K'.
t[key] = tk; // ok, T[K] ==> T[keyof T]
tk = t[key]; // error, T[keyof T] =/=> T[K]
~~
@@ -210,6 +215,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(100,5): error
!!! error TS2322: Type 'T[K]' is not assignable to type 'T[J]'.
!!! error TS2322: Type 'K' is not assignable to type 'J'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'J'.
!!! error TS2322: Type 'string' is not assignable to type 'J'.
tk = uj;
uj = tk; // error
@@ -34,11 +34,11 @@ Object.prototype.valueOf();
Object.prototype.hasOwnProperty("string");
>Object.prototype.hasOwnProperty("string") : boolean
>Object.prototype.hasOwnProperty : (v: string) => boolean
>Object.prototype.hasOwnProperty : (v: string | number | symbol) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>"string" : "string"
Object.prototype.isPrototypeOf(Object);
@@ -52,10 +52,10 @@ Object.prototype.isPrototypeOf(Object);
Object.prototype.propertyIsEnumerable("string");
>Object.prototype.propertyIsEnumerable("string") : boolean
>Object.prototype.propertyIsEnumerable : (v: string) => boolean
>Object.prototype.propertyIsEnumerable : (v: string | number | symbol) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>propertyIsEnumerable : (v: string) => boolean
>propertyIsEnumerable : (v: string | number | symbol) => boolean
>"string" : "string"
@@ -43,12 +43,16 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(143,5): error TS
Type 'T' is not assignable to type 'U'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(148,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
Type 'keyof U' is not assignable to type 'keyof T'.
Type 'string' is not assignable to type 'keyof T'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(153,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'.
Type 'keyof T' is not assignable to type 'K'.
Type 'string' is not assignable to type 'K'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(158,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
Type 'keyof U' is not assignable to type 'K'.
Type 'string' is not assignable to type 'K'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(163,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
Type 'keyof T' is not assignable to type 'K'.
Type 'string' is not assignable to type 'K'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'.
Type 'T[P]' is not assignable to type 'U[P]'.
Type 'T' is not assignable to type 'U'.
@@ -272,6 +276,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS
~
!!! error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
!!! error TS2322: Type 'keyof U' is not assignable to type 'keyof T'.
!!! error TS2322: Type 'string' is not assignable to type 'keyof T'.
}
function f73<T, K extends keyof T>(x: { [P in K]: T[P] }, y: { [P in keyof T]: T[P] }) {
@@ -280,6 +285,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS
~
!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'K'.
!!! error TS2322: Type 'string' is not assignable to type 'K'.
}
function f74<T, U extends T, K extends keyof T>(x: { [P in K]: T[P] }, y: { [P in keyof U]: U[P] }) {
@@ -288,6 +294,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS
~
!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
!!! error TS2322: Type 'keyof U' is not assignable to type 'K'.
!!! error TS2322: Type 'string' is not assignable to type 'K'.
}
function f75<T, U extends T, K extends keyof T>(x: { [P in K]: T[P] }, y: { [P in keyof T]: U[P] }) {
@@ -296,6 +303,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS
~
!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
!!! error TS2322: Type 'keyof T' is not assignable to type 'K'.
!!! error TS2322: Type 'string' is not assignable to type 'K'.
}
function f76<T, U extends T, K extends keyof T>(x: { [P in K]: T[P] }, y: { [P in K]: U[P] }) {
@@ -1,12 +1,14 @@
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.ts(3,12): error TS2693: 'Array' only refers to a type, but is being used as a value here.
!!! error TS2318: Cannot find global type 'Boolean'.
!!! error TS2318: Cannot find global type 'IArguments'.
!!! error TS2318: Cannot find global type 'Number'.
!!! error TS2318: Cannot find global type 'Object'.
==== tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.ts (1 errors) ====
// Error missing basic JavaScript objects
function f(x: number, y: number, z: number) {
@@ -80,9 +80,9 @@ var o = {
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty(Symbol.hasInstance) : boolean
>o.hasOwnProperty : (v: string) => boolean
>o.hasOwnProperty : (v: string | number | symbol) => boolean
>o : { a: number; [Symbol.hasInstance](value: any): boolean; }
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>Symbol.hasInstance : any
>Symbol : any
>hasInstance : any
@@ -100,9 +100,9 @@ var o = {
}
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>o : Symbol(o, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 38, 3))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -124,9 +124,9 @@ var o = {
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty(Symbol.hasInstance) : boolean
>o.hasOwnProperty : { (v: PropertyKey): boolean; (v: string): boolean; }
>o.hasOwnProperty : (v: string | number | symbol) => boolean
>o : { a: number; [Symbol.hasInstance](value: any): boolean; }
>hasOwnProperty : { (v: PropertyKey): boolean; (v: string): boolean; }
>hasOwnProperty : (v: string | number | symbol) => boolean
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
@@ -100,9 +100,9 @@ var o = {
}
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>o : Symbol(o, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 38, 3))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -124,9 +124,9 @@ var o = {
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty(Symbol.hasInstance) : boolean
>o.hasOwnProperty : { (v: PropertyKey): boolean; (v: string): boolean; }
>o.hasOwnProperty : (v: string | number | symbol) => boolean
>o : { a: number; [Symbol.hasInstance](value: any): boolean; }
>hasOwnProperty : { (v: PropertyKey): boolean; (v: string): boolean; }
>hasOwnProperty : (v: string | number | symbol) => boolean
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
@@ -100,9 +100,9 @@ var o = {
}
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>o : Symbol(o, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 38, 3))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -124,9 +124,9 @@ var o = {
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty(Symbol.hasInstance) : boolean
>o.hasOwnProperty : { (v: PropertyKey): boolean; (v: string): boolean; }
>o.hasOwnProperty : (v: string | number | symbol) => boolean
>o : { a: number; [Symbol.hasInstance](value: any): boolean; }
>hasOwnProperty : { (v: PropertyKey): boolean; (v: string): boolean; }
>hasOwnProperty : (v: string | number | symbol) => boolean
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
@@ -65,9 +65,9 @@ var o = {
}
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>o.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>o : Symbol(o, Decl(modularizeLibrary_TargetES6UsingES6Lib.ts, 21, 3))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.es5.d.ts, --, --))
>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -79,9 +79,9 @@ var o = {
};
o.hasOwnProperty(Symbol.hasInstance);
>o.hasOwnProperty(Symbol.hasInstance) : boolean
>o.hasOwnProperty : { (v: string): boolean; (v: PropertyKey): boolean; }
>o.hasOwnProperty : (v: string | number | symbol) => boolean
>o : { a: number; [Symbol.hasInstance](value: any): boolean; }
>hasOwnProperty : { (v: string): boolean; (v: PropertyKey): boolean; }
>hasOwnProperty : (v: string | number | symbol) => boolean
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
@@ -16,10 +16,10 @@ var p = new Proxy(t, {});
>{} : {}
Reflect.ownKeys({});
>Reflect.ownKeys({}) : PropertyKey[]
>Reflect.ownKeys : (target: object) => PropertyKey[]
>Reflect.ownKeys({}) : (string | number | symbol)[]
>Reflect.ownKeys : (target: object) => (string | number | symbol)[]
>Reflect : typeof Reflect
>ownKeys : (target: object) => PropertyKey[]
>ownKeys : (target: object) => (string | number | symbol)[]
>{} : {}
function* idGen() {
@@ -6,7 +6,7 @@ type T02 = string & never;
>T02 : never
type T03 = string | number | never;
>T03 : T03
>T03 : string | number
type T04 = string & number & never;
>T04 : never
@@ -13,9 +13,9 @@ var a = x.toExponential();
var b = x.hasOwnProperty('toFixed');
>b : boolean
>x.hasOwnProperty('toFixed') : boolean
>x.hasOwnProperty : (v: string) => boolean
>x.hasOwnProperty : (v: string | number | symbol) => boolean
>x : number
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'toFixed' : "toFixed"
var c = x['toExponential']();
@@ -28,7 +28,7 @@ var c = x['toExponential']();
var d = x['hasOwnProperty']('toFixed');
>d : boolean
>x['hasOwnProperty']('toFixed') : boolean
>x['hasOwnProperty'] : (v: string) => boolean
>x['hasOwnProperty'] : (v: string | number | symbol) => boolean
>x : number
>'hasOwnProperty' : "hasOwnProperty"
>'toFixed' : "toFixed"
@@ -5,9 +5,9 @@
Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({
>Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } })) : any
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>Object : ObjectConstructor
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>obj : {}
>"accProperty" : "accProperty"
><PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : PropertyDescriptor
@@ -1,8 +1,8 @@
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'data' of type 'A' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'hasOwnProperty' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(11,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'.
@@ -25,11 +25,11 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'data' of type 'A' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
!!! error TS2411: Property 'hasOwnProperty' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
@@ -1,7 +1,7 @@
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'hasOwnProperty' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'.
tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts(5,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'.
@@ -16,11 +16,11 @@ tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectInd
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
!!! error TS2411: Property 'hasOwnProperty' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'.
!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
!!! error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'.
~~~~~~~~~~~~~~~~~~~~
@@ -90,9 +90,9 @@
Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true });
>Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true }) : any
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>Object : ObjectConstructor
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor & ThisType<any>) => any
>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
>constructor.prototype : any
>constructor : any
>prototype : any
@@ -2810,11 +2810,11 @@ module Harness {
if (this.fileCollection.hasOwnProperty(p)) {
>this.fileCollection.hasOwnProperty(p) : boolean
>this.fileCollection.hasOwnProperty : (v: string) => boolean
>this.fileCollection.hasOwnProperty : (v: string | number | symbol) => boolean
>this.fileCollection : {}
>this : this
>fileCollection : {}
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>p : string
var current = <Harness.Compiler.WriterAggregator>this.fileCollection[p];
@@ -139,10 +139,10 @@ var aa = obj.x;
// Dotted property access of property that exists on value's apparent type
var bb = obj.hasOwnProperty;
>bb : (v: string) => boolean
>obj.hasOwnProperty : (v: string) => boolean
>bb : (v: string | number | symbol) => boolean
>obj.hasOwnProperty : (v: string | number | symbol) => boolean
>obj : { 10: string; x: string; y: number; z: { n: string; m: number; o: () => boolean; }; 'literal property': number; }
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
// Dotted property access of property that doesn't exist on value's apparent type
var cc = obj.qqq; // error
@@ -4,9 +4,9 @@ class A { }
A.hasOwnProperty('foo');
>A.hasOwnProperty('foo') : boolean
>A.hasOwnProperty : (v: string) => boolean
>A.hasOwnProperty : (v: string | number | symbol) => boolean
>A : typeof A
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'foo' : "foo"
class B {
@@ -16,9 +16,9 @@ class B {
}
B.hasOwnProperty('foo');
>B.hasOwnProperty('foo') : boolean
>B.hasOwnProperty : (v: string) => boolean
>B.hasOwnProperty : (v: string | number | symbol) => boolean
>B : typeof B
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'foo' : "foo"
@@ -14,9 +14,9 @@ var a = x.charAt(0);
var b = x.hasOwnProperty('charAt');
>b : boolean
>x.hasOwnProperty('charAt') : boolean
>x.hasOwnProperty : (v: string) => boolean
>x.hasOwnProperty : (v: string | number | symbol) => boolean
>x : string
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'charAt' : "charAt"
var c = x['charAt'](0);
@@ -30,7 +30,7 @@ var c = x['charAt'](0);
var e = x['hasOwnProperty']('toFixed');
>e : boolean
>x['hasOwnProperty']('toFixed') : boolean
>x['hasOwnProperty'] : (v: string) => boolean
>x['hasOwnProperty'] : (v: string | number | symbol) => boolean
>x : string
>'hasOwnProperty' : "hasOwnProperty"
>'toFixed' : "toFixed"
@@ -9,7 +9,7 @@ Symbol instanceof Symbol();
(Symbol() || {}) instanceof Object; // This one should be okay, it's a valid way of distinguishing types
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
Symbol instanceof (Symbol() || {});
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
@@ -46,9 +46,9 @@ function isResponseInData<T>(value: T | { data: T}): value is { data: T } {
return value.hasOwnProperty('data');
>value.hasOwnProperty('data') : boolean
>value.hasOwnProperty : (v: string) => boolean
>value.hasOwnProperty : (v: string | number | symbol) => boolean
>value : T | { data: T; }
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'data' : "data"
}
@@ -84,9 +84,9 @@ function isPlainResponse<T>(value: T | { data: T}): value is T {
return !value.hasOwnProperty('data');
>!value.hasOwnProperty('data') : boolean
>value.hasOwnProperty('data') : boolean
>value.hasOwnProperty : (v: string) => boolean
>value.hasOwnProperty : (v: string | number | symbol) => boolean
>value : T | { data: T; }
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>'data' : "data"
}
@@ -464,12 +464,12 @@ module ts {
var hasOwnProperty = Object.prototype.hasOwnProperty;
>hasOwnProperty : (v: string) => boolean
>Object.prototype.hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>Object.prototype.hasOwnProperty : (v: string | number | symbol) => boolean
>Object.prototype : Object
>Object : ObjectConstructor
>prototype : Object
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
function getProperty<T>(map: Map<T>, key: string): T {
>getProperty : <T>(map: Map<T>, key: string) => T
@@ -484,7 +484,7 @@ module ts {
>!hasOwnProperty.call(map, key) : boolean
>hasOwnProperty.call(map, key) : any
>hasOwnProperty.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>map : Map<T>
>key : string
@@ -507,7 +507,7 @@ module ts {
return hasOwnProperty.call(map, key);
>hasOwnProperty.call(map, key) : any
>hasOwnProperty.call : (this: Function, thisArg: any, ...argArray: any[]) => any
>hasOwnProperty : (v: string) => boolean
>hasOwnProperty : (v: string | number | symbol) => boolean
>call : (this: Function, thisArg: any, ...argArray: any[]) => any
>map : Map<T>
>key : string
@@ -6,7 +6,7 @@ var o = { a: 1, b: 2 };
for (var x of Object.values(o)) {
>x : Symbol(x, Decl(useObjectValuesAndEntries3.ts, 2, 8))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>o : Symbol(o, Decl(useObjectValuesAndEntries3.ts, 0, 3))
let y = x;
@@ -16,6 +16,6 @@ for (var x of Object.values(o)) {
var entries = Object.entries(o);
>entries : Symbol(entries, Decl(useObjectValuesAndEntries3.ts, 6, 3))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>o : Symbol(o, Decl(useObjectValuesAndEntries3.ts, 0, 3))
@@ -7,7 +7,7 @@ var o = { a: 1, b: 2 };
for (var x of Object.values(o)) {
>x : Symbol(x, Decl(useObjectValuesAndEntries4.ts, 2, 8))
>Object.values : Symbol(ObjectConstructor.values, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>values : Symbol(ObjectConstructor.values, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --))
>o : Symbol(o, Decl(useObjectValuesAndEntries4.ts, 0, 3))
@@ -19,7 +19,7 @@ for (var x of Object.values(o)) {
var entries = Object.entries(o);
>entries : Symbol(entries, Decl(useObjectValuesAndEntries4.ts, 6, 3))
>Object.entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --))
>o : Symbol(o, Decl(useObjectValuesAndEntries4.ts, 0, 3))