Skip to content

Commit

Permalink
silence ui/analyse type warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Oct 20, 2020
1 parent 50b6bab commit 95c5b0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/analyse/src/autoShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function compute(ctrl: AnalyseCtrl): DrawShape[] {
const instance = ctrl.getCeval();
const hovering = ctrl.explorer.hovering() || instance.hovering();
const {
eval: nEval = {},
eval: nEval = {} as Partial<Tree.ServerEval>,
fen: nFen,
ceval: nCeval,
threat: nThreat
Expand Down
4 changes: 2 additions & 2 deletions ui/analyse/src/evalCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function toCeval(e: Tree.ServerEval) {
fen: e.fen,
nodes: e.knodes * 1000,
depth: e.depth,
pvs: e.pvs.map(function(from) {
pvs: e.pvs.map(from => {
const to: any = {
moves: from.moves.split(' ')
moves: (from.moves as any).split(' ') // moves come from servers as a single string
};
if (defined(from.cp)) to.cp = from.cp;
else to.mate = from.mate;
Expand Down

0 comments on commit 95c5b0b

Please sign in to comment.