Skip to content

JSTC

js
declare const JSTC: JSTypeChecker;

A singleton instance for JSTypeChecker with default settings. Exported for convenience, but you can create your own instances of JSTypeChecker if you need custom configurations.

Example

ts
import { JSTC } from "jstc";
JSTC.setProtectionLevel("boundary");
const isValid = JSTC.for([42]).check(["number"]); // true