mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-29 18:09:01 +01:00
20 lines
816 B
TypeScript
20 lines
816 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
|
|
|
export const IStateService = createDecorator<IStateService>('stateService');
|
|
|
|
export interface IStateService {
|
|
readonly _serviceBrand: undefined;
|
|
|
|
getItem<T>(key: string, defaultValue: T): T;
|
|
getItem<T>(key: string, defaultValue?: T): T | undefined;
|
|
|
|
setItem(key: string, data?: object | string | number | boolean | undefined | null): void;
|
|
|
|
removeItem(key: string): void;
|
|
}
|