VCAPI Logo公式HP ↗公式HP ↗ (opens in a new tab)
GitHubGitHub (opens in a new tab)
  • Home
  • ER
    • Modules
      • Controllers Login
      • Controllers Openai
      • Index
      • Lambda
      • Lib Env
      • Lib Getdb
      • Middleware Guard
      • Middleware Remapping
      • Middleware Session
      • Models Gimmick
      • Models Login
      • Models Openai Chat
      • Models Session
      • Types
      • Utils
      • Utils Crypto
      • Utils Encode
      • Utils Error
      • Utils HTTP Status
      • Utils Image
      • Utils Memo
      • Utils Params
    • Readme
      • Types.variables
  • Home
  • ER
    • Modules
      • Controllers Login
      • Controllers Openai
      • Index
      • Lambda
      • Lib Env
      • Lib Getdb
      • Middleware Guard
      • Middleware Remapping
      • Middleware Session
      • Models Gimmick
      • Models Login
      • Models Openai Chat
      • Models Session
      • Types
      • Utils
      • Utils Crypto
      • Utils Encode
      • Utils Error
      • Utils HTTP Status
      • Utils Image
      • Utils Memo
        • Table of contents
        • Functions
      • Utils Params
    • Readme
      • Types.variables
  • 公式HP ↗ (opens in a new tab)

On This Page

  • Table of contents
  • Functions
  • Functions
  • useSingleton
  • Type parameters
  • Parameters
  • Returns
  • Defined in
Question? Give us feedback → (opens in a new tab)Edit this page
TypeDoc
Modules
Utils Memo

vcapi-workers / Exports / utils/memo

Module: utils/memo

メモ化に関するユーティリティ関数

Table of contents

Functions

  • useSingleton

Functions

useSingleton

▸ useSingleton<K, V>(c, key, make): V

make: (c) => V で作ったインスタンスを c.set(k, v) で保管しておき、 key が一致したら返す(シングルトンにする)

Type parameters

NameType
Kextends string
VV

Parameters

NameType
cContext
keyK
make(c: Context) => V

Returns

V

Defined in

src/utils/memo.ts:11 (opens in a new tab)

Utils ImageUtils Params

© 2023 VRC-Connections-API-Project