the tswhy logo: a question mark in a box

tswhy‽

A community effort to enrich TypeScript diagnostics.

TS1084

Invalid 'reference' directive syntax.

When using triple slash references, the tag must contain a path, types, lib, or no-default-lib key. If the tag does not include any of these keys, this error will be reported:

/// <reference />

Fix: Use a valid reference directive.

To fix the error, complete the tag by adding a valid key:

/// <reference path="./some-file" />
/// <reference types="node" />
/// <reference lib="es2015" />
/// <reference no-default-lib="true"/>

Also see Triple-Slash Directives in the TypeScript Handbook.