Skip to content

five-on-it / apps/client/src/renderer/draw / getOrCreate

Function: getOrCreate() ​

getOrCreate<K, V>(cache, key, make): V

Defined in: apps/client/src/renderer/draw.ts:18

The value cached under key (in a map, or a weak map), made (and cached) the first time it is asked for.

Type Parameters ​

K ​

K

V ​

V

Parameters ​

cache ​

get ​

set ​

key ​

K

make ​

(key) => V

Returns ​

V