mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Support multiple 'from' states
According to https://github.com/jakesgordon/javascript-state-machine: "If an event is allowed from multiple states, and always transitions to the same state, then simply provide an array of states in the from attribute of an event." So the from property can be of type string or string[], so "any" is required here.
This commit is contained in:
Vendored
+2
-2
@@ -11,7 +11,7 @@ interface StateMachineErrorCallback {
|
||||
|
||||
interface StateMachineEventDef {
|
||||
name: string;
|
||||
from: string;
|
||||
from: any; // string or string[]
|
||||
to: string;
|
||||
}
|
||||
|
||||
@@ -78,4 +78,4 @@ interface StateMachine {
|
||||
transition: StateMachineTransition;
|
||||
}
|
||||
|
||||
declare var StateMachine: StateMachineStatic;
|
||||
declare var StateMachine: StateMachineStatic;
|
||||
|
||||
Reference in New Issue
Block a user