mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
517 B
Plaintext
18 lines
517 B
Plaintext
indices.js(9,5): error TS2322: Type 'number' is not assignable to type 'boolean'.
|
|
|
|
|
|
==== indices.js (1 errors) ====
|
|
/** @type {Object.<string, number>} */
|
|
var o1;
|
|
/** @type {Object.<number, boolean>} */
|
|
var o2;
|
|
/** @type {Object.<boolean, string>} */
|
|
var o3;
|
|
/** @param {Object.<string, boolean>} o */
|
|
function f(o) {
|
|
o.foo = 1; // error
|
|
~~~~~
|
|
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
|
o.bar = false; // ok
|
|
}
|
|
|