createScope
createScope<
T
>(defaultValue
,options
?):MoleculeScope
<T
>
Create a MoleculeScope
A scope tuple is a combination of both a scope key and a scope value. For example, a scope key would be “User” and the scope value would be ”user1@example.com”
export const UserScope = createScope("user1")
Type parameters
Parameter | Default | Description |
---|---|---|
T | undefined | the type that this scope provides |
Parameters
Parameter | Type | Description |
---|---|---|
defaultValue | T | |
options ? | object | - |
options.debugLabel ? | string | - |
Returns
MoleculeScope
< T
>
a new unique MoleculeScope