Does Closure Compiler have any syntax for type checking tuples (arrays with specific values at specific indexes) as used by Object.entries(), Object.fromEntries(), and popular libraries like React? On a hunch I tried using a record type with numerical indexes, but that's not understood as equivalent to an array/iterable:
/** @returns {{0: !number, 1: !string}} */
function getTuple() {
return [99, "bottles of beer"];
}
JSC_TYPE_MISMATCH: inconsistent return type found : Array<?> required: { 0: number, 1: string }
Thanks!
Richard