templates/script.ts:898:7: error TS7034: Variable 'held' implicitly has type 'any' in some locations where its type cannot be determined.
templates/script.ts:954:32: error TS7005: Variable 'held' implicitly has an 'any' type.
Reported-by: Matthew Vernon <matthewv@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
predicate: (p: PieceInfo) => boolean
): MouseFindClicked {
let clicked: PieceId[];
- let held;
+ let held: string | null;
let pinned = false;
let already_count = 0;
held = p.held;
if (held == us && !allow_for_deselect) held = null;
}
- if (held == us) {
+ if (held! == us) {
// user is going to be deselecting
if (p.held != us) {
// skip ones we don't have