🔎 Search Terms
Assertion functions don't work with wildcard imports
🕗 Version & Regression Information
This changed between versions 6 or earlier and 7
⏯ Playground Link
No response
💻 Code
// foo.ts
export function f(x: any): asserts x is boolean {
if (typeof x === "boolean") return;
throw new Error("...");
}
// bar.ts
import * as m from "./foo.js";
const { f } = m;
f(!0);
🙁 Actual behavior
TS2775
🙂 Expected behavior
no error
Additional information about the issue
See #35004
🔎 Search Terms
Assertion functions don't work with wildcard imports
🕗 Version & Regression Information
This changed between versions 6 or earlier and 7
⏯ Playground Link
No response
💻 Code
🙁 Actual behavior
TS2775
🙂 Expected behavior
no error
Additional information about the issue
See #35004