GitHub
Preparing search index...
The search index is not available
ts-utils - v5.0.1-beta.1
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
mxssfd/core -
v5.0.1-
beta.1
str
Repeat
number2
Chinese
chinese2
Number
format
Date
mxssfd/dom -
v5.0.1-
beta.1
mxssfd/bom -
v5.0.1-
beta.1
copy2
Clipboard
mxssfd/types -
v5.0.1-
beta.1
mxssfd/random-
picker -
v5.0.1-
beta.1
@mxssfd/random-picker
Responsibility
Chain
责任链
State
constructor
chain
index
_value
_status
init
Value?
on
Done?
next
done
value
status
start
run
ts-utils - v5.0.1-beta.1
mxssfd/core
ResponsibilityChain
Class ResponsibilityChain<T>
责任链
Type Parameters
T
Hierarchy
ResponsibilityChain
Index
Properties
State
chain
index
_value
_status
init
Value?
on
Done?
next
done
Constructors
constructor
Accessors
value
status
Methods
start
run
Properties
Static
Readonly
State
State
:
typeof
State
= State
Private
chain
chain
:
Chain
<
T
>
Private
index
index
:
number
Private
_value
_value
:
T
Private
_status
_status
:
State
= State.ready
Private
Optional
init
Value
init
Value
?:
T
Optional
on
Done
on
Done
?:
OnDone
<
T
>
Private
next
next
:
Next
<
T
>
= ...
Private
done
done
:
Done
<
T
>
= ...
Constructors
constructor
new
Responsibility
Chain
<
T
>
(
chain
:
(
ChainItem
<
T
>
|
ChainHandler
<
T
>
)
[]
, initValue
?:
T
, onDone
?:
OnDone
<
T
>
)
:
ResponsibilityChain
<
T
>
Type Parameters
T
Parameters
chain:
(
ChainItem
<
T
>
|
ChainHandler
<
T
>
)
[]
Optional
initValue:
T
Optional
onDone:
OnDone
<
T
>
Returns
ResponsibilityChain
<
T
>
Accessors
value
get
value
(
)
:
T
Returns
T
status
get
status
(
)
:
State
Returns
State
Methods
start
start
(
value
?:
T
)
:
ResponsibilityChain
<
T
>
Parameters
Optional
value:
T
Returns
ResponsibilityChain
<
T
>
Private
run
run
(
)
:
void
Returns
void
责任链