Skip to content

typescript/triple-slash-reference Correctness ​

✅ This rule is turned on by default.

What it does ​

Disallow certain triple slash directives in favor of ES6-style import declarations.

Why is this bad? ​

Use of triple-slash reference type directives is generally discouraged in favor of ECMAScript Module imports.

Example ​

ts
/// <reference lib="code" />
globalThis.value;

References ​

Released under the MIT License.