identity (common/cache.ts)

vscode · extensions/copilot/src/util/vs/base/common/cache.ts · typescript · MIT
auth, tag:embed-classified

Generic cache classes and helpers for memoizing async tasks in TypeScript.

// Source: https://github.com/microsoft/vscode | License: MIT | Copyright 2015 - present Microsoft Corporation
// Provided via justclaw.it.com; keep this notice with the code.
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { CancellationToken, CancellationTokenSource } from './cancellation';
import { IDisposable } from './lifecycle';

export interface CacheResult<T> extends IDisposable {
	promise: Promise<T>;
}

expo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key