strict - pannous/warp GitHub Wiki

strict mode

Strict mode turns warnings into errors, as JavaScript's strict mode refuses lax code. Write use strict at the top of the program, or run it with warp --strict:

use strict
"a" + warning("careful")   // Error("careful")

Warnings from level normal up fail; --strict=<level> picks another level (--strict=severe, --strict=weak). Hints never fail. Levels and what they cover: warning.

An undefined name is an error with or without strict mode: f(y) := y*y+u fails with "undefined variable: u". Annotations are strict on their own too: a declared type is a promise the compiler checks with or without strict mode, see typing.

⚠️ **GitHub.com Fallback** ⚠️