Interface ContextKeyService

interface ContextKeyService {
    onDidChange: Event<ContextKeyChangeEvent>;
    createKey<T>(key, defaultValue): ContextKey<T>;
    createOverlay(overlay): ContextMatcher;
    createScoped(target): ScopedValueStore;
    match(expression, context?): boolean;
    parseKeys(expression): undefined | Set<string>;
    setContext(key, value): void;
    with<T>(values, callback): T;
}

Hierarchy (view full)

Implemented by

Properties

Methods

  • Parameters

    • expression: string

    Returns undefined | Set<string>

    a Set of the keys used by the given expression or undefined if none are used or the expression cannot be parsed.

  • Creates a temporary context that will use the values passed in when evaluating callback. The callback must be synchronous.

    Type Parameters

    • T

    Parameters

    • values: Record<string, unknown>
    • callback: (() => T)
        • (): T
        • Returns T

    Returns T