Hierarchy
- Context
Constructors
constructor
+ new Context(env
: object, opts
: NormalizedFullOptions, sync
: boolean): Context
Defined in context/context.ts:14
Parameters:
Name | Type | Default |
---|---|---|
env |
object | {} |
opts |
NormalizedFullOptions | defaultOptions |
sync |
boolean | false |
Returns: Context
Properties
environments
• environments: Scope
Defined in context/context.ts:11
globals
• globals: Scope
Defined in context/context.ts:12
opts
• opts: NormalizedFullOptions
Defined in context/context.ts:14
Private
registers
• registers: object
Defined in context/context.ts:10
Type declaration:
Private
scopes
• scopes: Scope[] = [{}]
Defined in context/context.ts:9
sync
• sync: boolean
Defined in context/context.ts:13
Methods
bottom
▸ bottom(): PlainObject | Drop
Defined in context/context.ts:57
Returns: PlainObject | Drop
Private
findScope
▸ findScope(key
: string): PlainObject | Drop
Defined in context/context.ts:60
Parameters:
Name | Type |
---|---|
key |
string |
Returns: PlainObject | Drop
get
▸ get(paths
: string[]): object
Defined in context/context.ts:37
Parameters:
Name | Type |
---|---|
paths |
string[] |
Returns: object
getAll
▸ getAll(): PlainObject | Drop
Defined in context/context.ts:33
Returns: PlainObject | Drop
getFromScope
▸ getFromScope(scope
: object, paths
: string[] | string): object
Defined in context/context.ts:41
Parameters:
Name | Type |
---|---|
scope |
object |
paths |
string[] | string |
Returns: object
getRegister
▸ getRegister(key
: string, defaultValue
: object): any
Defined in context/context.ts:21
Parameters:
Name | Type | Default |
---|---|---|
key |
string | - |
defaultValue |
object | {} |
Returns: any
pop
▸ pop(): undefined | PlainObject | Drop
Defined in context/context.ts:54
Returns: undefined | PlainObject | Drop
push
▸ push(ctx
: object): number
Defined in context/context.ts:51
Parameters:
Name | Type |
---|---|
ctx |
object |
Returns: number
restoreRegister
▸ restoreRegister(keyValues
: [string, any][]): void
Defined in context/context.ts:30
Parameters:
Name | Type |
---|---|
keyValues |
[string, any][] |
Returns: void
saveRegister
▸ saveRegister(…keys
: string[]): [string, any][]
Defined in context/context.ts:27
Parameters:
Name | Type |
---|---|
...keys |
string[] |
Returns: [string, any][]
setRegister
▸ setRegister(key
: string, value
: any): any
Defined in context/context.ts:24
Parameters:
Name | Type |
---|---|
key |
string |
value |
any |
Returns: any