Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Memento

A memento represents a storage utility. It can store and retrieve values.

层级

  • Memento

索引

Methods(3)

Methods(3)

keys

  • keys(): readonly string[]
  • Returns the stored keys.

    Returns readonly string[]

    The stored keys.

get

  • get<T>(key: string): undefined | T
  • get<T>(key: string, defaultValue: T): T
  • Return a value.

    Type parameters

    • T

    Parameters

    • key: string

      A string.

    Returns undefined | T

    The stored value or undefined.

  • Return a value.

    Type parameters

    • T

    Parameters

    • key: string

      A string.

    • defaultValue: T

      A value that should be returned when there is no value (undefined) with the given key.

    Returns T

    The stored value or the defaultValue.

update

  • update(key: string, value: any): Thenable<void>
  • Store a value. The value must be JSON-stringifyable.

    Parameters

    • key: string

      A string.

    • value: any

      A value. MUST not contain cyclic references.

    Returns Thenable<void>

VS Code 插件开发中文文档 | VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc | 站长统计