pyBlob · GitHub

TypeScript Version: 3.5.3, 3.6.3

Search Terms:

  • triple slash lib dom
  • triple slash global

Code

arbitrary.d.ts

/// <reference lib="dom" />

index.ts

export let x: Element;

Expected behavior:
Executing npx tsc --noEmit --target esnext --lib esnext index.ts should produce a compile error because Element is not defined nor imported and lib dom is not set globally.

The documentation for triple slash directives states the following:
https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html

Actual behavior:
It just compiles.

Related Issues:

Read the original on github.com ↗