Context
No description provided
Context
Parameter | Type | Optional |
---|---|---|
defaultValue | T | ✅ |
Properties
public isLost: any
Whether the context is lost
Methods
public consume(): undefined | T
Get the current value of the context. If the context is lost and no default value is provided, undefined will be returned.
public exit(scope): void
Exit out of this context
Parameter | Type | Optional |
---|---|---|
scope | ContextReceiver<void> | ❌ |
public provide(value, receiver): R
Run a function within the context of this provider
Parameter | Type | Optional |
---|---|---|
value | T | ❌ |
receiver | ContextReceiver<R> | ❌ |