typescript-state-machine
Advanced tools
Comparing version 0.9.4 to 0.9.5
@@ -29,4 +29,4 @@ export declare namespace fsm { | ||
checkInOneOfStates(states: T[], message?: string): void; | ||
protected inOneOfStates(states: T[]): boolean; | ||
protected inState(state: T): boolean; | ||
inOneOfStates(states: T[]): boolean; | ||
inState(state: T): boolean; | ||
private invokeAllTransitionListeners; | ||
@@ -39,4 +39,4 @@ private invokeTransitionListeners; | ||
setState(newState: T): void; | ||
canGoToState(newState: T): boolean; | ||
private checkTransition; | ||
protected canGoToState(newState: T): boolean; | ||
} | ||
@@ -43,0 +43,0 @@ interface Transitions<T> { |
@@ -154,2 +154,5 @@ "use strict"; | ||
}; | ||
StateMachineImpl.prototype.canGoToState = function (newState) { | ||
return this.validTransitions[this._state.label].indexOf(newState) !== -1; | ||
}; | ||
StateMachineImpl.prototype.checkTransition = function (newState) { | ||
@@ -160,5 +163,2 @@ if (!this.canGoToState(newState)) { | ||
}; | ||
StateMachineImpl.prototype.canGoToState = function (newState) { | ||
return this.validTransitions[this._state.label].indexOf(newState) !== -1; | ||
}; | ||
return StateMachineImpl; | ||
@@ -165,0 +165,0 @@ }()); |
{ | ||
"name": "typescript-state-machine", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -101,7 +101,7 @@ import { getLogger } from 'log4javascript' | ||
protected inOneOfStates(states: T[]): boolean { | ||
inOneOfStates(states: T[]): boolean { | ||
return (states.indexOf(this._state) !== -1) | ||
} | ||
protected inState(state: T): boolean { | ||
inState(state: T): boolean { | ||
return this._state === state | ||
@@ -197,2 +197,6 @@ } | ||
canGoToState(newState: T): boolean { | ||
return this.validTransitions[this._state.label].indexOf(newState) !== -1 | ||
} | ||
private checkTransition(newState: T) { | ||
@@ -203,6 +207,2 @@ if (!this.canGoToState(newState)) { | ||
} | ||
protected canGoToState(newState: T): boolean { | ||
return this.validTransitions[this._state.label].indexOf(newState) !== -1 | ||
} | ||
} | ||
@@ -209,0 +209,0 @@ |
Sorry, the diff of this file is not supported yet
Possible typosquat attack
Supply chain riskThere is a package with a similar name that is downloaded much more often.
Did you mean |
---|
javascript-state-machine |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40468
9
1
1