Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ContextKeyService

Hierarchy

Index

Properties

Methods

  • createKey<T>(key: string, defaultValue: undefined | T): ContextKey<T>
  • dispose(): void
  • match(expression: string, context?: HTMLElement): boolean
  • Whether the expression is satisfied. If context provided, the service will attempt to retrieve a context object associated with that element.

    Parameters

    • expression: string
    • Optional context: HTMLElement

    Returns boolean

  • parseKeys(expression: string): undefined | Set<string>
  • setContext(key: string, value: unknown): void
  • with<T>(values: Record<string, unknown>, callback: (() => T)): T
  • Creates a temporary context that will use the values passed in when evaluating callback callback must be synchronous.

    Type Parameters

    • T

    Parameters

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

    Returns T