@@ -494,7 +494,7 @@ function renderAndMaybeCommitSelection(selection: {[index: ObjectId]: ObjectTemp
494
494
clearNumberBuffer ( ) ;
495
495
}
496
496
function commitSelection ( selection : { [ index : ObjectId ] : ObjectTempProps } ) {
497
- let move : any [ ] = [ ] ; // TODO
497
+ let move : ( string | number ) [ ] = [ ] ;
498
498
move . push ( getMyUserId ( ) ) ;
499
499
for ( let id in selection ) {
500
500
let object = objectsById [ id ] ;
@@ -532,14 +532,13 @@ function commitSelection(selection: {[index: ObjectId]: ObjectTempProps}) {
532
532
}
533
533
}
534
534
if ( move . length <= 1 ) return ;
535
- let message = {
535
+ sendMessage ( {
536
536
cmd : "makeAMove" ,
537
537
args : move ,
538
- } ;
539
- sendMessage ( message ) ;
538
+ } ) ;
540
539
pushChangeToHistory ( move ) ;
541
540
}
542
- function pushObjectProps ( move : any [ ] , object : ObjectState ) { // TODO
541
+ function pushObjectProps ( move : ( string | number ) [ ] , object : ObjectState ) {
543
542
move . push (
544
543
object . id ,
545
544
object . prototype ,
@@ -549,14 +548,14 @@ function pushObjectProps(move: any[], object: ObjectState) { // TODO
549
548
object . faceIndex ) ;
550
549
}
551
550
const objectPropCount = 6 ;
552
- function consumeObjectProps ( move : any [ ] , i : number ) : ObjectState { // TODO
551
+ function consumeObjectProps ( move : ( string | number ) [ ] , i : number ) : ObjectState {
553
552
let object = makeObject (
554
- move [ i ++ ] , // id
555
- move [ i ++ ] , // prototypeId
556
- move [ i ++ ] , // x
557
- move [ i ++ ] , // y
558
- move [ i ++ ] , // z
559
- move [ i ++ ] , // faceIndex
553
+ move [ i ++ ] as string , // id
554
+ move [ i ++ ] as string , // prototypeId
555
+ move [ i ++ ] as number , // x
556
+ move [ i ++ ] as number , // y
557
+ move [ i ++ ] as number , // z
558
+ move [ i ++ ] as number , // faceIndex
560
559
) ;
561
560
return object ;
562
561
}
@@ -707,7 +706,7 @@ function deleteSelection() {
707
706
partialDeletion = true ;
708
707
}
709
708
710
- let move : any [ ] = [ ] ; // TODO
709
+ let move : ( string | number ) [ ] = [ ] ;
711
710
objects . forEach ( function ( object ) {
712
711
if ( ! object . temporary ) {
713
712
move . push ( "d" ) ; // delete
0 commit comments