Code
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: a.js
/** @param {number} [p] */
function f(p) {
p = undefined
p = null
}
Expected behavior:
The type of p should be number | null | undefined, and should be optional in the signature of f.
Actual behavior:
p is optional but doesn't include null | undefined in its type.
Code
Expected behavior:
The type of p should be
number | null | undefined, and should be optional in the signature off.Actual behavior:
p is optional but doesn't include
null | undefinedin its type.