Setter for caching value within diInit callback
Call it with value for caching
Call it without arguments for getting value from cache
const num = dic<number>()num(5) // cache 5 inside `num` setternum() // 5num(10) // change cached value to 10num() // 10 Copy
const num = dic<number>()num(5) // cache 5 inside `num` setternum() // 5num(10) // change cached value to 10num() // 10
Optional
Setter for caching value within diInit callback
Call it with value for caching
Call it without arguments for getting value from cache
Example