Setter for caching constant value within diInit callback
Call it with constant value for caching
Call it without arguments for getting constant value from cache
const num = dic<number>()num(5) // cache 5 inside `num` setternum() // 5num(10) // no affect, because 5 already cachednum() // 5 Copy
const num = dic<number>()num(5) // cache 5 inside `num` setternum() // 5num(10) // no affect, because 5 already cachednum() // 5
Optional
Setter for caching constant value within diInit callback
Call it with constant value for caching
Call it without arguments for getting constant value from cache
Example