Path: blob/main/extensions/copilot/src/util/vs/base-common.d.ts
13397 views
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'12/*---------------------------------------------------------------------------------------------3* Copyright (c) Microsoft Corporation. All rights reserved.4* Licensed under the MIT License. See License.txt in the project root for license information.5*--------------------------------------------------------------------------------------------*/67// Declare types that we probe for to implement util and/or polyfill functions89declare global {1011// --- idle callbacks1213interface IdleDeadline {14readonly didTimeout: boolean;15timeRemaining(): number;16}1718function requestIdleCallback(callback: (args: IdleDeadline) => void, options?: { timeout: number }): number;19function cancelIdleCallback(handle: number): void;202122// --- timeout / interval (available in all contexts, but different signatures in node.js vs web)2324interface TimeoutHandle { readonly _: never; /* this is a trick that seems needed to prevent direct number assignment */ }25type Timeout = TimeoutHandle;26function setTimeout(handler: string | Function, timeout?: number, ...arguments: any[]): Timeout;27function clearTimeout(timeout: Timeout | undefined): void;2829function setInterval(callback: (...args: any[]) => void, delay?: number, ...args: any[]): Timeout;30function clearInterval(timeout: Timeout | undefined): void;313233// --- error3435interface ErrorConstructor {36captureStackTrace(targetObject: object, constructorOpt?: Function): void;37stackTraceLimit: number;38}39}4041export { }424344