Code
// @filename: declares.d.ts// this is the declaration for 'assert' from @types/nodeexportfunctionart(value: any,message?: string|Error): asserts value;// @filename: test.jsconst{ art }=require('./declares')letx=1art(x)Expected behavior:
No error.
Actual behavior:
Error: "Assertions require every name in the call target to be declared with an explicit type annotation."
There is no error when using ES imports:
// @filename: test2.jsimport{art}from'./declares'letx=1art(x)
Code
Expected behavior:
No error.
Actual behavior:
Error: "Assertions require every name in the call target to be declared with an explicit type annotation."
There is no error when using ES imports: