mirror of
https://github.com/denoland/deno.git
synced 2025-01-08 15:19:40 -05:00
fix(cli/dts): Use var instead of const and let for globals (#7680)
This commit is contained in:
parent
eb7f70c0b0
commit
0ffaaba164
6 changed files with 14 additions and 16 deletions
4
cli/dts/lib.deno.shared_globals.d.ts
vendored
4
cli/dts/lib.deno.shared_globals.d.ts
vendored
|
@ -222,8 +222,6 @@ interface DOMStringList {
|
||||||
|
|
||||||
type BufferSource = ArrayBufferView | ArrayBuffer;
|
type BufferSource = ArrayBufferView | ArrayBuffer;
|
||||||
|
|
||||||
declare const isConsoleInstance: unique symbol;
|
|
||||||
|
|
||||||
declare interface Console {
|
declare interface Console {
|
||||||
assert(condition?: boolean, ...data: any[]): void;
|
assert(condition?: boolean, ...data: any[]): void;
|
||||||
clear(): void;
|
clear(): void;
|
||||||
|
@ -584,7 +582,7 @@ declare class Performance {
|
||||||
now(): number;
|
now(): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const performance: Performance;
|
declare var performance: Performance;
|
||||||
|
|
||||||
declare interface PerformanceMarkOptions {
|
declare interface PerformanceMarkOptions {
|
||||||
/** Metadata to be included in the mark. */
|
/** Metadata to be included in the mark. */
|
||||||
|
|
8
cli/dts/lib.deno.window.d.ts
vendored
8
cli/dts/lib.deno.window.d.ts
vendored
|
@ -17,9 +17,9 @@ declare interface Window extends EventTarget {
|
||||||
Deno: typeof Deno;
|
Deno: typeof Deno;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const window: Window & typeof globalThis;
|
declare var window: Window & typeof globalThis;
|
||||||
declare const self: Window & typeof globalThis;
|
declare var self: Window & typeof globalThis;
|
||||||
declare const onload: ((this: Window, ev: Event) => any) | null;
|
declare var onload: ((this: Window, ev: Event) => any) | null;
|
||||||
declare const onunload: ((this: Window, ev: Event) => any) | null;
|
declare var onunload: ((this: Window, ev: Event) => any) | null;
|
||||||
|
|
||||||
/* eslint-enable @typescript-eslint/no-explicit-any */
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
||||||
|
|
12
cli/dts/lib.deno.worker.d.ts
vendored
12
cli/dts/lib.deno.worker.d.ts
vendored
|
@ -18,9 +18,9 @@ declare interface DedicatedWorkerGlobalScope {
|
||||||
Deno: typeof Deno;
|
Deno: typeof Deno;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const self: DedicatedWorkerGlobalScope & typeof globalThis;
|
declare var self: DedicatedWorkerGlobalScope & typeof globalThis;
|
||||||
declare let onmessage: ((e: { data: any }) => Promise<void> | void) | undefined;
|
declare var onmessage: ((e: { data: any }) => Promise<void> | void) | undefined;
|
||||||
declare let onerror:
|
declare var onerror:
|
||||||
| ((
|
| ((
|
||||||
msg: string,
|
msg: string,
|
||||||
source: string,
|
source: string,
|
||||||
|
@ -29,9 +29,9 @@ declare let onerror:
|
||||||
e: Event,
|
e: Event,
|
||||||
) => boolean | void)
|
) => boolean | void)
|
||||||
| undefined;
|
| undefined;
|
||||||
declare const close: typeof __workerMain.close;
|
declare var close: typeof __workerMain.close;
|
||||||
declare const name: typeof __workerMain.name;
|
declare var name: typeof __workerMain.name;
|
||||||
declare const postMessage: typeof __workerMain.postMessage;
|
declare var postMessage: typeof __workerMain.postMessage;
|
||||||
|
|
||||||
declare namespace __workerMain {
|
declare namespace __workerMain {
|
||||||
export let onmessage: (e: { data: any }) => void;
|
export let onmessage: (e: { data: any }) => void;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
declare namespace Deno [WILDCARD]
|
declare namespace Deno [WILDCARD]
|
||||||
declare const window: Window [WILDCARD]
|
declare var window: Window [WILDCARD]
|
||||||
|
|
2
op_crates/fetch/lib.deno_fetch.d.ts
vendored
2
op_crates/fetch/lib.deno_fetch.d.ts
vendored
|
@ -142,7 +142,7 @@ interface ReadableStream<R = any> {
|
||||||
}): AsyncIterableIterator<R>;
|
}): AsyncIterableIterator<R>;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const ReadableStream: {
|
declare var ReadableStream: {
|
||||||
prototype: ReadableStream;
|
prototype: ReadableStream;
|
||||||
new (
|
new (
|
||||||
underlyingSource: UnderlyingByteSource,
|
underlyingSource: UnderlyingByteSource,
|
||||||
|
|
2
op_crates/web/lib.deno_web.d.ts
vendored
2
op_crates/web/lib.deno_web.d.ts
vendored
|
@ -231,7 +231,7 @@ interface AbortSignal extends EventTarget {
|
||||||
): void;
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const AbortSignal: {
|
declare var AbortSignal: {
|
||||||
prototype: AbortSignal;
|
prototype: AbortSignal;
|
||||||
new (): AbortSignal;
|
new (): AbortSignal;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue