mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update DOM from TSJS-lib-generator (#32335)
* Update DOM from TSJS-lib-generator 1. Update Navigator and other small updates. 2. Make ProgressEvent generic. 3. Make `window: Window & typeof globalThis`. 4. Add types: * CSS Overflow * CSS Masking * Web Authentication * WebGL 2 The big change is that `window` now includes globals in its type via `typeof globalThis`. This helps some codebases a lot, such as chrome-devtools-frontend. * Update baselines
This commit is contained in:
Vendored
+2468
-1306
File diff suppressed because it is too large
Load Diff
Vendored
+76
-35
@@ -63,16 +63,16 @@ interface FileList {
|
||||
|
||||
interface FormData {
|
||||
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the list.
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the list.
|
||||
*/
|
||||
entries(): IterableIterator<[string, FormDataEntryValue]>;
|
||||
/**
|
||||
* Returns a list of keys in the list.
|
||||
/**
|
||||
* Returns a list of keys in the list.
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Returns a list of values in the list.
|
||||
/**
|
||||
* Returns a list of values in the list.
|
||||
*/
|
||||
values(): IterableIterator<FormDataEntryValue>;
|
||||
}
|
||||
@@ -99,16 +99,16 @@ interface HTMLSelectElement {
|
||||
|
||||
interface Headers {
|
||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||
/**
|
||||
* Returns an iterator allowing to go through all key/value pairs contained in this object.
|
||||
/**
|
||||
* Returns an iterator allowing to go through all key/value pairs contained in this object.
|
||||
*/
|
||||
entries(): IterableIterator<[string, string]>;
|
||||
/**
|
||||
* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
|
||||
/**
|
||||
* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
|
||||
/**
|
||||
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
|
||||
*/
|
||||
values(): IterableIterator<string>;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ interface MediaList {
|
||||
}
|
||||
|
||||
interface MimeTypeArray {
|
||||
[Symbol.iterator](): IterableIterator<Plugin>;
|
||||
[Symbol.iterator](): IterableIterator<MimeType>;
|
||||
}
|
||||
|
||||
interface NamedNodeMap {
|
||||
@@ -147,32 +147,32 @@ interface Navigator {
|
||||
|
||||
interface NodeList {
|
||||
[Symbol.iterator](): IterableIterator<Node>;
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the list.
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the list.
|
||||
*/
|
||||
entries(): IterableIterator<[number, Node]>;
|
||||
/**
|
||||
* Returns an list of keys in the list.
|
||||
/**
|
||||
* Returns an list of keys in the list.
|
||||
*/
|
||||
keys(): IterableIterator<number>;
|
||||
/**
|
||||
* Returns an list of values in the list.
|
||||
/**
|
||||
* Returns an list of values in the list.
|
||||
*/
|
||||
values(): IterableIterator<Node>;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> {
|
||||
[Symbol.iterator](): IterableIterator<TNode>;
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the list.
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the list.
|
||||
*/
|
||||
entries(): IterableIterator<[number, TNode]>;
|
||||
/**
|
||||
* Returns an list of keys in the list.
|
||||
/**
|
||||
* Returns an list of keys in the list.
|
||||
*/
|
||||
keys(): IterableIterator<number>;
|
||||
/**
|
||||
* Returns an list of values in the list.
|
||||
/**
|
||||
* Returns an list of values in the list.
|
||||
*/
|
||||
values(): IterableIterator<TNode>;
|
||||
}
|
||||
@@ -242,16 +242,16 @@ interface TouchList {
|
||||
|
||||
interface URLSearchParams {
|
||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the search params.
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the search params.
|
||||
*/
|
||||
entries(): IterableIterator<[string, string]>;
|
||||
/**
|
||||
* Returns a list of keys in the search params.
|
||||
/**
|
||||
* Returns a list of keys in the search params.
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Returns a list of values in the search params.
|
||||
/**
|
||||
* Returns a list of values in the search params.
|
||||
*/
|
||||
values(): IterableIterator<string>;
|
||||
}
|
||||
@@ -272,7 +272,52 @@ interface WebAuthentication {
|
||||
makeCredential(accountInformation: Account, cryptoParameters: Iterable<ScopedCredentialParameters>, attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
||||
}
|
||||
|
||||
interface WebGL2RenderingContextBase {
|
||||
invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
|
||||
invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
||||
uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
|
||||
vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
|
||||
drawBuffers(buffers: Iterable<GLenum>): void;
|
||||
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
|
||||
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
|
||||
clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void;
|
||||
transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
|
||||
getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null;
|
||||
getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
|
||||
}
|
||||
|
||||
interface WebGL2RenderingContextOverloads {
|
||||
uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
||||
}
|
||||
|
||||
interface WebGLRenderingContextBase {
|
||||
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
}
|
||||
|
||||
interface WebGLRenderingContextOverloads {
|
||||
uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
||||
uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
||||
uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
||||
@@ -284,8 +329,4 @@ interface WebGLRenderingContextBase {
|
||||
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
||||
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
||||
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
||||
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
|
||||
}
|
||||
|
||||
Vendored
+1100
-67
File diff suppressed because it is too large
Load Diff
@@ -27,9 +27,9 @@ class Derived extends Base {
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout : Symbol(WindowOrWorkerGlobalScope.setTimeout, Decl(lib.dom.d.ts, --, --))
|
||||
>window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>setTimeout : Symbol(WindowOrWorkerGlobalScope.setTimeout, Decl(lib.dom.d.ts, --, --))
|
||||
>setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
// Arrow function as value in array literal
|
||||
|
||||
@@ -108,9 +108,9 @@ module M2 {
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout : Symbol(WindowOrWorkerGlobalScope.setTimeout, Decl(lib.dom.d.ts, --, --))
|
||||
>window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>setTimeout : Symbol(WindowOrWorkerGlobalScope.setTimeout, Decl(lib.dom.d.ts, --, --))
|
||||
>setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
// Arrow function as value in array literal
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts ===
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
var p = () => this;
|
||||
>p : any
|
||||
@@ -33,9 +33,9 @@ class Derived extends Base {
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout(() => null, 100) : number
|
||||
>window.setTimeout : (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number
|
||||
>window : Window
|
||||
>setTimeout : (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number
|
||||
>window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number)
|
||||
>window : Window & typeof globalThis
|
||||
>setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number)
|
||||
>() => null : () => any
|
||||
>null : null
|
||||
>100 : 100
|
||||
@@ -104,7 +104,7 @@ module M2 {
|
||||
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
var p = () => this;
|
||||
>p : any
|
||||
@@ -136,9 +136,9 @@ module M2 {
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout(() => null, 100) : number
|
||||
>window.setTimeout : (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number
|
||||
>window : Window
|
||||
>setTimeout : (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number
|
||||
>window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number)
|
||||
>window : Window & typeof globalThis
|
||||
>setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number)
|
||||
>() => null : () => any
|
||||
>null : null
|
||||
>100 : 100
|
||||
|
||||
@@ -3,7 +3,7 @@ async () => {
|
||||
>async () => { if (window) return;} : () => Promise<void>
|
||||
|
||||
if (window)
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ for (let _ of [])
|
||||
|
||||
// @ts-ignore suppress `with` statement error
|
||||
with (window)
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
const enum H {}
|
||||
>H : error
|
||||
|
||||
@@ -5,7 +5,7 @@ tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot
|
||||
tests/cases/conformance/enums/enumErrors.ts(9,9): error TS2322: Type 'Number' is not assignable to type 'E5'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(26,9): error TS2322: Type 'true' is not assignable to type 'E11'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(27,9): error TS2322: Type 'Date' is not assignable to type 'E11'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(28,9): error TS2322: Type 'Window' is not assignable to type 'E11'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(28,9): error TS2322: Type 'Window & typeof globalThis' is not assignable to type 'E11'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2322: Type '{}' is not assignable to type 'E11'.
|
||||
tests/cases/conformance/enums/enumErrors.ts(35,9): error TS2553: Computed values are not permitted in an enum with string valued members.
|
||||
tests/cases/conformance/enums/enumErrors.ts(36,9): error TS2553: Computed values are not permitted in an enum with string valued members.
|
||||
@@ -57,7 +57,7 @@ tests/cases/conformance/enums/enumErrors.ts(38,9): error TS2553: Computed values
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'E11'.
|
||||
C = window,
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'Window' is not assignable to type 'E11'.
|
||||
!!! error TS2322: Type 'Window & typeof globalThis' is not assignable to type 'E11'.
|
||||
D = {}
|
||||
~~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'E11'.
|
||||
|
||||
@@ -67,7 +67,7 @@ enum E11 {
|
||||
|
||||
C = window,
|
||||
>C : E11
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
D = {}
|
||||
>D : E11
|
||||
@@ -89,7 +89,7 @@ enum E12 {
|
||||
|
||||
C = window,
|
||||
>C : E12.B
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
D = {},
|
||||
>D : E12.B
|
||||
|
||||
@@ -7,7 +7,7 @@ Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false });
|
||||
>Object.defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
|
||||
>Object : ObjectConstructor
|
||||
>defineProperty : (o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>"prop" : "prop"
|
||||
>{ value: "v1.0.0", readonly: false } : { value: string; readonly: boolean; }
|
||||
>value : string
|
||||
|
||||
@@ -56,7 +56,7 @@ tests/cases/conformance/fixSignatureCaching.ts(979,37): error TS2580: Cannot fin
|
||||
tests/cases/conformance/fixSignatureCaching.ts(980,23): error TS2304: Cannot find name 'define'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(980,48): error TS2304: Cannot find name 'define'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(981,16): error TS2304: Cannot find name 'define'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(983,44): error TS2339: Property 'MobileDetect' does not exist on type 'Window'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(983,44): error TS2339: Property 'MobileDetect' does not exist on type 'Window & typeof globalThis'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/fixSignatureCaching.ts (59 errors) ====
|
||||
@@ -1160,7 +1160,7 @@ tests/cases/conformance/fixSignatureCaching.ts(983,44): error TS2339: Property '
|
||||
} else if (typeof window !== 'undefined') {
|
||||
return function (factory) { window.MobileDetect = factory(); };
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'MobileDetect' does not exist on type 'Window'.
|
||||
!!! error TS2339: Property 'MobileDetect' does not exist on type 'Window & typeof globalThis'.
|
||||
} else {
|
||||
// please file a bug if you get this error!
|
||||
throw new Error('unknown environment');
|
||||
|
||||
@@ -1605,28 +1605,28 @@ define(function () {
|
||||
|
||||
return window.screen.width < window.screen.height ?
|
||||
>window.screen.width : Symbol(Screen.width, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>width : Symbol(Screen.width, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen.height : Symbol(Screen.height, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>height : Symbol(Screen.height, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
window.screen.width :
|
||||
>window.screen.width : Symbol(Screen.width, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>width : Symbol(Screen.width, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
window.screen.height;
|
||||
>window.screen.height : Symbol(Screen.height, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>height : Symbol(Screen.height, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
};
|
||||
@@ -2046,9 +2046,9 @@ define(function () {
|
||||
// environment-dependent
|
||||
if (typeof window !== 'undefined' && window.screen) {
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>window.screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(Window.screen, Decl(lib.dom.d.ts, --, --))
|
||||
>screen : Symbol(screen, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
MobileDetect.isPhoneSized = function (maxPhoneWidth) {
|
||||
>MobileDetect.isPhoneSized : Symbol(MobileDetect.isPhoneSized, Decl(fixSignatureCaching.ts, 961, 57), Decl(fixSignatureCaching.ts, 965, 12))
|
||||
|
||||
@@ -2730,26 +2730,26 @@ define(function () {
|
||||
>window.screen.width < window.screen.height : boolean
|
||||
>window.screen.width : number
|
||||
>window.screen : Screen
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>screen : Screen
|
||||
>width : number
|
||||
>window.screen.height : number
|
||||
>window.screen : Screen
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>screen : Screen
|
||||
>height : number
|
||||
|
||||
window.screen.width :
|
||||
>window.screen.width : number
|
||||
>window.screen : Screen
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>screen : Screen
|
||||
>width : number
|
||||
|
||||
window.screen.height;
|
||||
>window.screen.height : number
|
||||
>window.screen : Screen
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>screen : Screen
|
||||
>height : number
|
||||
|
||||
@@ -3423,10 +3423,10 @@ define(function () {
|
||||
>typeof window !== 'undefined' && window.screen : Screen
|
||||
>typeof window !== 'undefined' : boolean
|
||||
>typeof window : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>'undefined' : "undefined"
|
||||
>window.screen : Screen
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>screen : Screen
|
||||
|
||||
MobileDetect.isPhoneSized = function (maxPhoneWidth) {
|
||||
@@ -3521,7 +3521,7 @@ define(function () {
|
||||
} else if (typeof window !== 'undefined') {
|
||||
>typeof window !== 'undefined' : boolean
|
||||
>typeof window : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>'undefined' : "undefined"
|
||||
|
||||
return function (factory) { window.MobileDetect = factory(); };
|
||||
@@ -3529,7 +3529,7 @@ define(function () {
|
||||
>factory : any
|
||||
>window.MobileDetect = factory() : any
|
||||
>window.MobileDetect : any
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>MobileDetect : any
|
||||
>factory() : any
|
||||
>factory : any
|
||||
|
||||
@@ -111,14 +111,14 @@ function fn10() { }
|
||||
|
||||
//Function overloads that differ only by type parameter constraints where constraints are structually identical
|
||||
function fn11<T extends Window>();
|
||||
>fn11 : { <T extends Window>(): any; <S extends Window>(): any; }
|
||||
>fn11 : { <T extends Window>(): any; <S extends Window & typeof globalThis>(): any; }
|
||||
|
||||
function fn11<S extends typeof window>();
|
||||
>fn11 : { <T extends Window>(): any; <S extends Window>(): any; }
|
||||
>window : Window
|
||||
>fn11 : { <T extends Window>(): any; <S extends Window & typeof globalThis>(): any; }
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
function fn11() { }
|
||||
>fn11 : { <T extends Window>(): any; <S extends Window>(): any; }
|
||||
>fn11 : { <T extends Window>(): any; <S extends Window & typeof globalThis>(): any; }
|
||||
|
||||
//Function overloads that differ only by type parameter constraints where constraints include infinitely recursive type reference
|
||||
interface List<T> {
|
||||
|
||||
@@ -5,9 +5,9 @@ window.name = 1;
|
||||
>name : Symbol(Window.name, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
window.console; // should not have error: Property 'console' does not exist on type 'typeof window'.
|
||||
>window.console : Symbol(WindowConsole.console, Decl(lib.dom.d.ts, --, --))
|
||||
>window.console : Symbol(console, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --), Decl(bug27099.js, 0, 0))
|
||||
>console : Symbol(WindowConsole.console, Decl(lib.dom.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
module.exports = 'anything';
|
||||
>module.exports : Symbol("tests/cases/conformance/salsa/bug27099", Decl(bug27099.js, 0, 0))
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
window.name = 1;
|
||||
>window.name = 1 : 1
|
||||
>window.name : string
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>name : string
|
||||
>1 : 1
|
||||
|
||||
window.console; // should not have error: Property 'console' does not exist on type 'typeof window'.
|
||||
>window.console : Console
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>console : Console
|
||||
|
||||
module.exports = 'anything';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +1,11 @@
|
||||
=== tests/cases/compiler/globalThisCapture.ts ===
|
||||
// Add a lambda to ensure global 'this' capture is triggered
|
||||
(()=>this.window);
|
||||
>(()=>this.window) : () => Window
|
||||
>()=>this.window : () => Window
|
||||
>this.window : Window
|
||||
>(()=>this.window) : () => Window & typeof globalThis
|
||||
>()=>this.window : () => Window & typeof globalThis
|
||||
>this.window : Window & typeof globalThis
|
||||
>this : typeof globalThis
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
var parts = [];
|
||||
>parts : any[]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es2019/globalThisPropertyAssignment.js(4,8): error TS2339: Property 'z' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/globalThisPropertyAssignment.js(4,8): error TS2339: Property 'z' does not exist on type 'Window & typeof globalThis'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2019/globalThisPropertyAssignment.js (1 errors) ====
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/es2019/globalThisPropertyAssignment.js(4,8): error TS233
|
||||
// should work in JS
|
||||
window.z = 3
|
||||
~
|
||||
!!! error TS2339: Property 'z' does not exist on type 'Window'.
|
||||
!!! error TS2339: Property 'z' does not exist on type 'Window & typeof globalThis'.
|
||||
// should work in JS (even though it's a secondary declaration)
|
||||
globalThis.alpha = 4
|
||||
|
||||
@@ -14,7 +14,7 @@ var y = 2
|
||||
window.z = 3
|
||||
>window.z = 3 : 3
|
||||
>window.z : any
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>z : any
|
||||
>3 : 3
|
||||
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
tests/cases/conformance/es2019/actual.ts(8,6): error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/actual.ts(9,6): error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/actual.ts(10,8): error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/actual.ts(11,8): error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/actual.ts(12,5): error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/actual.ts(13,5): error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/b.js(8,6): error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/b.js(9,6): error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/b.js(10,8): error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/b.js(11,8): error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/b.js(12,5): error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
tests/cases/conformance/es2019/b.js(13,5): error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2019/b.js (6 errors) ====
|
||||
==== tests/cases/conformance/es2019/b.js (2 errors) ====
|
||||
var a = 10;
|
||||
this.a;
|
||||
this.b;
|
||||
@@ -21,17 +13,9 @@ tests/cases/conformance/es2019/b.js(13,5): error TS2339: Property 'b' does not e
|
||||
|
||||
// DOM access is not supported until the index signature is handled more strictly
|
||||
self.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
self.b;
|
||||
~
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
window.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
window.b;
|
||||
~
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
top.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
@@ -39,7 +23,7 @@ tests/cases/conformance/es2019/b.js(13,5): error TS2339: Property 'b' does not e
|
||||
~
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
|
||||
==== tests/cases/conformance/es2019/actual.ts (6 errors) ====
|
||||
==== tests/cases/conformance/es2019/actual.ts (2 errors) ====
|
||||
var b = 10;
|
||||
this.a;
|
||||
this.b;
|
||||
@@ -48,17 +32,9 @@ tests/cases/conformance/es2019/b.js(13,5): error TS2339: Property 'b' does not e
|
||||
|
||||
// same here -- no DOM access to globalThis yet
|
||||
self.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
self.b;
|
||||
~
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
window.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
window.b;
|
||||
~
|
||||
!!! error TS2339: Property 'b' does not exist on type 'Window'.
|
||||
top.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'Window'.
|
||||
|
||||
@@ -24,16 +24,24 @@ globalThis.b;
|
||||
|
||||
// DOM access is not supported until the index signature is handled more strictly
|
||||
self.a;
|
||||
>self.a : Symbol(a, Decl(b.js, 0, 3))
|
||||
>self : Symbol(self, Decl(lib.dom.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(b.js, 0, 3))
|
||||
|
||||
self.b;
|
||||
>self.b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
>self : Symbol(self, Decl(lib.dom.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
|
||||
window.a;
|
||||
>window.a : Symbol(a, Decl(b.js, 0, 3))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(b.js, 0, 3))
|
||||
|
||||
window.b;
|
||||
>window.b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
|
||||
top.a;
|
||||
>top : Symbol(top, Decl(lib.dom.d.ts, --, --))
|
||||
@@ -67,16 +75,24 @@ globalThis.b;
|
||||
|
||||
// same here -- no DOM access to globalThis yet
|
||||
self.a;
|
||||
>self.a : Symbol(a, Decl(b.js, 0, 3))
|
||||
>self : Symbol(self, Decl(lib.dom.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(b.js, 0, 3))
|
||||
|
||||
self.b;
|
||||
>self.b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
>self : Symbol(self, Decl(lib.dom.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
|
||||
window.a;
|
||||
>window.a : Symbol(a, Decl(b.js, 0, 3))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(b.js, 0, 3))
|
||||
|
||||
window.b;
|
||||
>window.b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(actual.ts, 0, 3))
|
||||
|
||||
top.a;
|
||||
>top : Symbol(top, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
@@ -25,24 +25,24 @@ globalThis.b;
|
||||
|
||||
// DOM access is not supported until the index signature is handled more strictly
|
||||
self.a;
|
||||
>self.a : any
|
||||
>self : Window
|
||||
>a : any
|
||||
>self.a : number
|
||||
>self : Window & typeof globalThis
|
||||
>a : number
|
||||
|
||||
self.b;
|
||||
>self.b : any
|
||||
>self : Window
|
||||
>b : any
|
||||
>self.b : number
|
||||
>self : Window & typeof globalThis
|
||||
>b : number
|
||||
|
||||
window.a;
|
||||
>window.a : any
|
||||
>window : Window
|
||||
>a : any
|
||||
>window.a : number
|
||||
>window : Window & typeof globalThis
|
||||
>a : number
|
||||
|
||||
window.b;
|
||||
>window.b : any
|
||||
>window : Window
|
||||
>b : any
|
||||
>window.b : number
|
||||
>window : Window & typeof globalThis
|
||||
>b : number
|
||||
|
||||
top.a;
|
||||
>top.a : any
|
||||
@@ -81,24 +81,24 @@ globalThis.b;
|
||||
|
||||
// same here -- no DOM access to globalThis yet
|
||||
self.a;
|
||||
>self.a : any
|
||||
>self : Window
|
||||
>a : any
|
||||
>self.a : number
|
||||
>self : Window & typeof globalThis
|
||||
>a : number
|
||||
|
||||
self.b;
|
||||
>self.b : any
|
||||
>self : Window
|
||||
>b : any
|
||||
>self.b : number
|
||||
>self : Window & typeof globalThis
|
||||
>b : number
|
||||
|
||||
window.a;
|
||||
>window.a : any
|
||||
>window : Window
|
||||
>a : any
|
||||
>window.a : number
|
||||
>window : Window & typeof globalThis
|
||||
>a : number
|
||||
|
||||
window.b;
|
||||
>window.b : any
|
||||
>window : Window
|
||||
>b : any
|
||||
>window.b : number
|
||||
>window : Window & typeof globalThis
|
||||
>b : number
|
||||
|
||||
top.a;
|
||||
>top.a : any
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
>response : Symbol(response, Decl(example.ts, 2, 7))
|
||||
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
|
||||
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
const blob = await response.blob();
|
||||
@@ -26,7 +26,7 @@
|
||||
>image : Symbol(image, Decl(example.ts, 7, 7))
|
||||
>src : Symbol(HTMLImageElement.src, Decl(lib.dom.d.ts, --, --))
|
||||
>URL.createObjectURL : Symbol(createObjectURL, Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>createObjectURL : Symbol(createObjectURL, Decl(lib.dom.d.ts, --, --))
|
||||
>blob : Symbol(blob, Decl(example.ts, 3, 7))
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
>response : Symbol(response, Decl(example.ts, 2, 7))
|
||||
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
|
||||
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
const blob = await response.blob();
|
||||
@@ -26,7 +26,7 @@
|
||||
>image : Symbol(image, Decl(example.ts, 7, 7))
|
||||
>src : Symbol(HTMLImageElement.src, Decl(lib.dom.d.ts, --, --))
|
||||
>URL.createObjectURL : Symbol(createObjectURL, Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>createObjectURL : Symbol(createObjectURL, Decl(lib.dom.d.ts, --, --))
|
||||
>blob : Symbol(blob, Decl(example.ts, 3, 7))
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
var p2 = window.
|
||||
>p2 : any
|
||||
>window. : any
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
> : any
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ tests/cases/compiler/intersectionsOfLargeUnions2.ts(31,15): error TS2536: Type '
|
||||
interface ElementTagNameMap {
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'ElementTagNameMap'.
|
||||
!!! related TS6203 /.ts/lib.dom.d.ts:18325:6: 'ElementTagNameMap' was also declared here.
|
||||
!!! related TS6203 /.ts/lib.dom.d.ts:19479:6: 'ElementTagNameMap' was also declared here.
|
||||
[index: number]: HTMLElement
|
||||
}
|
||||
|
||||
|
||||
@@ -555,8 +555,8 @@ for (const action of actions) {
|
||||
|
||||
window[action] = (x, y) => {
|
||||
>window[action] = (x, y) => { window[action](x, y); } : (x: number, y: number) => void
|
||||
>window[action] : ((x: number, y: number) => void) & ((x: number, y: number) => void)
|
||||
>window : Window
|
||||
>window[action] : ((x: number, y: number) => void) & ((x: number, y: number) => void) & ((x: number, y: number) => void) & ((x: number, y: number) => void)
|
||||
>window : Window & typeof globalThis
|
||||
>action : "resizeTo" | "resizeBy"
|
||||
>(x, y) => { window[action](x, y); } : (x: number, y: number) => void
|
||||
>x : number
|
||||
@@ -564,8 +564,8 @@ for (const action of actions) {
|
||||
|
||||
window[action](x, y);
|
||||
>window[action](x, y) : void
|
||||
>window[action] : ((x: number, y: number) => void) | ((x: number, y: number) => void)
|
||||
>window : Window
|
||||
>window[action] : (((x: number, y: number) => void) & ((x: number, y: number) => void)) | (((x: number, y: number) => void) & ((x: number, y: number) => void))
|
||||
>window : Window & typeof globalThis
|
||||
>action : "resizeTo" | "resizeBy"
|
||||
>x : number
|
||||
>y : number
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/salsa/bug27025.js(1,25): error TS2339: Property 'nonprop' does not exist on type 'Window'.
|
||||
tests/cases/conformance/salsa/bug27025.js(1,25): error TS2339: Property 'nonprop' does not exist on type 'Window & typeof globalThis'.
|
||||
tests/cases/conformance/salsa/bug27025.js(2,15): error TS2304: Cannot find name 'bar'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/salsa/bug27025.js (2 errors) ====
|
||||
module.exports = window.nonprop;
|
||||
~~~~~~~
|
||||
!!! error TS2339: Property 'nonprop' does not exist on type 'Window'.
|
||||
!!! error TS2339: Property 'nonprop' does not exist on type 'Window & typeof globalThis'.
|
||||
exports.foo = bar;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'bar'.
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = window.nonprop;
|
||||
>module : { "tests/cases/conformance/salsa/bug27025": any; }
|
||||
>exports : any
|
||||
>window.nonprop : any
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>nonprop : any
|
||||
|
||||
exports.foo = bar;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/multiExtendsSplitInterfaces1.ts ===
|
||||
self.cancelAnimationFrame(0);
|
||||
>self.cancelAnimationFrame : Symbol(AnimationFrameProvider.cancelAnimationFrame, Decl(lib.dom.d.ts, --, --))
|
||||
>self.cancelAnimationFrame : Symbol(cancelAnimationFrame, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>self : Symbol(self, Decl(lib.dom.d.ts, --, --))
|
||||
>cancelAnimationFrame : Symbol(AnimationFrameProvider.cancelAnimationFrame, Decl(lib.dom.d.ts, --, --))
|
||||
>cancelAnimationFrame : Symbol(cancelAnimationFrame, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== tests/cases/compiler/multiExtendsSplitInterfaces1.ts ===
|
||||
self.cancelAnimationFrame(0);
|
||||
>self.cancelAnimationFrame(0) : void
|
||||
>self.cancelAnimationFrame : (handle: number) => void
|
||||
>self : Window
|
||||
>cancelAnimationFrame : (handle: number) => void
|
||||
>self.cancelAnimationFrame : ((handle: number) => void) & ((handle: number) => void)
|
||||
>self : Window & typeof globalThis
|
||||
>cancelAnimationFrame : ((handle: number) => void) & ((handle: number) => void)
|
||||
>0 : 0
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ const o2 = Object.fromEntries(new URLSearchParams());
|
||||
>Object.fromEntries : Symbol(ObjectConstructor.fromEntries, Decl(lib.es2019.object.d.ts, --, --), Decl(lib.es2019.object.d.ts, --, --))
|
||||
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>fromEntries : Symbol(ObjectConstructor.fromEntries, Decl(lib.es2019.object.d.ts, --, --), Decl(lib.es2019.object.d.ts, --, --))
|
||||
>URLSearchParams : Symbol(URLSearchParams, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.iterable.d.ts, --, --))
|
||||
>URLSearchParams : Symbol(URLSearchParams, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.iterable.d.ts, --, --))
|
||||
|
||||
const o3 = Object.fromEntries(new Map([[Symbol("key"), "value"]]));
|
||||
>o3 : Symbol(o3, Decl(objectFromEntries.ts, 2, 5))
|
||||
|
||||
@@ -7,6 +7,6 @@ var x = function () { }
|
||||
|
||||
(<any>window).foo;
|
||||
><any>window : any
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
>foo : any
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ function foo(x:any) {}
|
||||
foo(()=>this.window);
|
||||
>foo(()=>this.window) : void
|
||||
>foo : (x: any) => void
|
||||
>()=>this.window : () => Window
|
||||
>this.window : Window
|
||||
>()=>this.window : () => Window & typeof globalThis
|
||||
>this.window : Window & typeof globalThis
|
||||
>this : typeof globalThis
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var f = () => {this.window;}
|
||||
>f : () => void
|
||||
>() => {this.window;} : () => void
|
||||
>this.window : Window
|
||||
>this.window : Window & typeof globalThis
|
||||
>this : typeof globalThis
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== tests/cases/compiler/topLevelLambda4.ts ===
|
||||
export var x = () => this.window;
|
||||
>x : () => Window
|
||||
>() => this.window : () => Window
|
||||
>this.window : Window
|
||||
>x : () => Window & typeof globalThis
|
||||
>() => this.window : () => Window & typeof globalThis
|
||||
>this.window : Window & typeof globalThis
|
||||
>this : typeof globalThis
|
||||
>window : Window
|
||||
>window : Window & typeof globalThis
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct
|
||||
Types of parameters 'n' and 'b' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,33): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(121,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(121,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
@@ -153,7 +153,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
!!! related TS6203 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts:120:5: 'a9e' was also declared here.
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~
|
||||
|
||||
@@ -437,15 +437,15 @@ interface A92 {
|
||||
>z : Window
|
||||
}
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : { x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : someGenerics9
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: window } : { x: number; z: Window; }
|
||||
>{ x: 6, z: window } : { x: number; z: Window & typeof globalThis; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
>z : Window
|
||||
>window : Window
|
||||
>z : Window & typeof globalThis
|
||||
>window : Window & typeof globalThis
|
||||
>{ x: 6, y: '' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
@@ -453,18 +453,18 @@ var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : { x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : any
|
||||
>new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' }) : any
|
||||
>someGenerics9 : someGenerics9
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: window } : { x: number; z: Window; }
|
||||
>{ x: 6, z: window } : { x: number; z: Window & typeof globalThis; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
>z : Window
|
||||
>window : Window
|
||||
>z : Window & typeof globalThis
|
||||
>window : Window & typeof globalThis
|
||||
>{ x: 6, y: '' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(66,31): error TS2345: Argument of type '<A, B extends string, C>(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,29): error TS2345: Argument of type '0' is not assignable to parameter of type '""'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(88,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(88,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,70): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
@@ -139,7 +139,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
var a9e: {};
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'.
|
||||
!!! related TS6203 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:87:5: 'a9e' was also declared here.
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~
|
||||
|
||||
@@ -411,15 +411,15 @@ interface A92 {
|
||||
>z : Window
|
||||
}
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9e : { x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }) : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>someGenerics9 : <T extends any>(a: T, b: T, c: T) => T
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: window } : { x: number; z: Window; }
|
||||
>{ x: 6, z: window } : { x: number; z: Window & typeof globalThis; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
>z : Window
|
||||
>window : Window
|
||||
>z : Window & typeof globalThis
|
||||
>window : Window & typeof globalThis
|
||||
>{ x: 6, y: '' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
@@ -427,18 +427,18 @@ var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>'' : ""
|
||||
|
||||
var a9e: {};
|
||||
>a9e : { x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
>a9e : { x: number; z: Window & typeof globalThis; y?: undefined; } | { x: number; y: string; z?: undefined; }
|
||||
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
>a9f : any
|
||||
>someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' }) : any
|
||||
>someGenerics9 : <T extends any>(a: T, b: T, c: T) => T
|
||||
>undefined : undefined
|
||||
>{ x: 6, z: window } : { x: number; z: Window; }
|
||||
>{ x: 6, z: window } : { x: number; z: Window & typeof globalThis; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
>z : Window
|
||||
>window : Window
|
||||
>z : Window & typeof globalThis
|
||||
>window : Window & typeof globalThis
|
||||
>{ x: 6, y: '' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>6 : 6
|
||||
|
||||
@@ -37,7 +37,9 @@ my.app.Application()
|
||||
=== tests/cases/conformance/salsa/b.js ===
|
||||
var min = window.min || {};
|
||||
>min : Symbol(min, Decl(b.js, 0, 3), Decl(b.js, 0, 27), Decl(b.js, 1, 24))
|
||||
>window.min : Symbol(min, Decl(b.js, 0, 3), Decl(b.js, 0, 27), Decl(b.js, 1, 24))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>min : Symbol(min, Decl(b.js, 0, 3), Decl(b.js, 0, 27), Decl(b.js, 1, 24))
|
||||
|
||||
min.app = min.app || {};
|
||||
>min.app : Symbol(min.app, Decl(b.js, 0, 27), Decl(b.js, 3, 4))
|
||||
|
||||
@@ -48,10 +48,10 @@ my.app.Application()
|
||||
=== tests/cases/conformance/salsa/b.js ===
|
||||
var min = window.min || {};
|
||||
>min : typeof min
|
||||
>window.min || {} : any
|
||||
>window.min : error
|
||||
>window : Window
|
||||
>min : any
|
||||
>window.min || {} : typeof min | {}
|
||||
>window.min : typeof min
|
||||
>window : Window & typeof globalThis
|
||||
>min : typeof min
|
||||
>{} : {}
|
||||
|
||||
min.app = min.app || {};
|
||||
|
||||
@@ -112,7 +112,9 @@ my.predicate.type = class {
|
||||
// global-ish prefixes
|
||||
var min = window.min || {};
|
||||
>min : Symbol(min, Decl(a.js, 29, 3), Decl(a.js, 29, 27), Decl(a.js, 30, 44))
|
||||
>window.min : Symbol(min, Decl(a.js, 29, 3), Decl(a.js, 29, 27), Decl(a.js, 30, 44))
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
>min : Symbol(min, Decl(a.js, 29, 3), Decl(a.js, 29, 27), Decl(a.js, 30, 44))
|
||||
|
||||
min.nest = this.min.nest || function () { };
|
||||
>min.nest : Symbol(min.nest, Decl(a.js, 29, 27), Decl(a.js, 31, 4))
|
||||
@@ -130,7 +132,13 @@ min.nest.other = self.min.nest.other || class { };
|
||||
>min : Symbol(min, Decl(a.js, 29, 3), Decl(a.js, 29, 27), Decl(a.js, 30, 44))
|
||||
>nest : Symbol(min.nest, Decl(a.js, 29, 27), Decl(a.js, 31, 4))
|
||||
>other : Symbol(min.nest.other, Decl(a.js, 30, 44))
|
||||
>self.min.nest.other : Symbol(min.nest.other, Decl(a.js, 30, 44))
|
||||
>self.min.nest : Symbol(min.nest, Decl(a.js, 29, 27), Decl(a.js, 31, 4))
|
||||
>self.min : Symbol(min, Decl(a.js, 29, 3), Decl(a.js, 29, 27), Decl(a.js, 30, 44))
|
||||
>self : Symbol(self, Decl(lib.dom.d.ts, --, --))
|
||||
>min : Symbol(min, Decl(a.js, 29, 3), Decl(a.js, 29, 27), Decl(a.js, 30, 44))
|
||||
>nest : Symbol(min.nest, Decl(a.js, 29, 27), Decl(a.js, 31, 4))
|
||||
>other : Symbol(min.nest.other, Decl(a.js, 30, 44))
|
||||
|
||||
min.property = global.min.property || {};
|
||||
>min.property : Symbol(min.property, Decl(a.js, 31, 50))
|
||||
|
||||
@@ -145,10 +145,10 @@ my.predicate.type = class {
|
||||
// global-ish prefixes
|
||||
var min = window.min || {};
|
||||
>min : typeof min
|
||||
>window.min || {} : any
|
||||
>window.min : error
|
||||
>window : Window
|
||||
>min : any
|
||||
>window.min || {} : typeof min | {}
|
||||
>window.min : typeof min
|
||||
>window : Window & typeof globalThis
|
||||
>min : typeof min
|
||||
>{} : {}
|
||||
|
||||
min.nest = this.min.nest || function () { };
|
||||
@@ -172,13 +172,13 @@ min.nest.other = self.min.nest.other || class { };
|
||||
>nest : { (): void; other: typeof other; }
|
||||
>other : typeof other
|
||||
>self.min.nest.other || class { } : typeof other
|
||||
>self.min.nest.other : error
|
||||
>self.min.nest : any
|
||||
>self.min : any
|
||||
>self : Window
|
||||
>min : any
|
||||
>nest : any
|
||||
>other : any
|
||||
>self.min.nest.other : typeof other
|
||||
>self.min.nest : { (): void; other: typeof other; }
|
||||
>self.min : typeof min
|
||||
>self : Window & typeof globalThis
|
||||
>min : typeof min
|
||||
>nest : { (): void; other: typeof other; }
|
||||
>other : typeof other
|
||||
>class { } : typeof other
|
||||
|
||||
min.property = global.min.property || {};
|
||||
|
||||
Reference in New Issue
Block a user