File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " algorithm-visualizer" ,
3- "version" : " 2.3.0 " ,
3+ "version" : " 2.3.1 " ,
44 "description" : " Visualization Library for JavaScript" ,
55 "keywords" : [
66 " algorithm" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Commander {
1414 private static objectCount = 0 ;
1515 public static commands : Command [ ] = [ ] ;
1616
17- static command ( key : string | null , method : string , iArguments : IArguments ) : void {
17+ static command ( key : string | null , method : string , iArguments : IArguments ) : Commander {
1818 const args = Array . from ( iArguments ) ;
1919 this . commands . push ( {
2020 key,
@@ -23,14 +23,15 @@ class Commander {
2323 } ) ;
2424 if ( this . commands . length > MAX_COMMANDS ) throw new Error ( 'Too Many Commands' ) ;
2525 if ( this . objectCount > MAX_OBJECTS ) throw new Error ( 'Too Many Objects' ) ;
26+ return ( < any > this ) ;
2627 }
2728
28- static setRoot ( child : Commander ) {
29- this . command ( null , 'setRoot' , arguments ) ;
29+ static setRoot ( child : Commander ) : Commander {
30+ return this . command ( null , 'setRoot' , arguments ) ;
3031 }
3132
32- static delay ( lineNumber ?: Number ) {
33- this . command ( null , 'delay' , arguments ) ;
33+ static delay ( lineNumber ?: Number ) : Commander {
34+ return this . command ( null , 'delay' , arguments ) ;
3435 }
3536
3637 private readonly key : string ;
You can’t perform that action at this time.
0 commit comments