Skip to content

@sora-soft/framework


@sora-soft/framework / RootScope

Class: RootScope

Defined in: packages/framework/src/lib/context/scope/RootScope.ts:3

Extends

Constructors

Constructor

ts
new RootScope(): RootScope;

Defined in: packages/framework/src/lib/context/scope/RootScope.ts:4

Returns

RootScope

Overrides

LogScope.constructor

Properties

PropertyModifierTypeInherited fromDefined in
id_protectedstringScope.id_packages/framework/src/lib/context/Scope.ts:62
parent_?protectedScope<unknown>Scope.parent_packages/framework/src/lib/context/Scope.ts:63
stack_protectedstringScope.stack_packages/framework/src/lib/context/Scope.ts:65
store_protectedvoidLogScope.store_packages/framework/src/lib/context/Scope.ts:64

Accessors

id

Get Signature

ts
get id(): string;

Defined in: packages/framework/src/lib/context/Scope.ts:58

Returns

string

Inherited from

Scope.id


logCategory

Get Signature

ts
get logCategory(): string;

Defined in: packages/framework/src/lib/context/scope/RootScope.ts:8

Returns

string

Overrides

LogScope.logCategory


parent

Get Signature

ts
get parent(): Scope<unknown> | undefined;

Defined in: packages/framework/src/lib/context/Scope.ts:46

Returns

Scope<unknown> | undefined

Set Signature

ts
set parent(value): void;

Defined in: packages/framework/src/lib/context/Scope.ts:50

Parameters
ParameterType
valueScope<unknown> | undefined
Returns

void

Inherited from

Scope.parent


stack

Get Signature

ts
get stack(): string;

Defined in: packages/framework/src/lib/context/Scope.ts:54

Returns

string

Inherited from

Scope.stack


store

Get Signature

ts
get store(): T;

Defined in: packages/framework/src/lib/context/Scope.ts:42

Returns

T

Inherited from

LogScope.store

Methods

isInChain()

ts
protected isInChain(id): boolean;

Defined in: packages/framework/src/lib/context/Scope.ts:38

Parameters

ParameterType
idstring

Returns

boolean

Inherited from

LogScope.isInChain


run()

ts
run<R>(storage, callback): R;

Defined in: packages/framework/src/lib/context/Scope.ts:23

Type Parameters

Type Parameter
R

Parameters

ParameterType
storageAsyncLocalStorage<Scope<unknown>>
callback() => R

Returns

R

Inherited from

LogScope.run


setStore()

ts
setStore(data): void;

Defined in: packages/framework/src/lib/context/Scope.ts:34

Parameters

ParameterType
datavoid

Returns

void

Inherited from

LogScope.setStore

基于 WTFPL 许可发布