Explore Library
Code QuizIntermediate

Implicit any from JS Import

Diagnose why an import from a plain JS module has no type safety.

Codetypescript
// legacy.js has no accompanying .d.ts file
import { calculate } from './legacy';

// expected a number, but this compiles without complaint
const result: number = calculate('not', 'numbers');

Why does this unsafe call compile without a type error?