π 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