no-wrapper-object-types
Configuration
rslint.config.ts
Rule Details
Disallow using the upper-cased built-in primitive class wrappers — BigInt, Boolean, Number, Object, String, and Symbol — as type names. The lower-cased primitive forms (bigint, boolean, number, object, string, symbol) are the safe choice in every case: primitives are compared by value and have predictable truthiness, while the wrapper objects are compared by reference and are always truthy.
A local declaration with the same name (a type alias, interface, or class) shadows the global wrapper, in which case the reference is no longer the unsafe built-in and is not reported.
Examples of incorrect code for this rule:
Examples of correct code for this rule: