mirror of
https://github.com/swc-project/swc.git
synced 2024-12-28 08:04:43 +03:00
16 lines
331 B
TypeScript
16 lines
331 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noEmit: true
|
|
// @Filename: indices.js
|
|
/** @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
|
|
o.bar = false; // ok
|
|
}
|