Closed
Description
Code
// @filename: declares.d.ts
// this is the declaration for 'assert' from @types/node
export function art(value: any, message?: string | Error): asserts value;
// @filename: test.js
const { art } = require('./declares')
let x = 1
art(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.js
import { art } from './declares'
let x = 1
art(x)