> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-wrapper-object-types

[Added in v0.6.0](https://github.com/web-infra-dev/rslint/releases/tag/v0.6.0)
## Configuration

| Preset                              | Configured Value |
| ----------------------------------- | ---------------- |
| ✅ ts.configs.recommended            | `"error"`        |
| ✅ ts.configs.recommendedTypeChecked | `"error"`        |
| ✅ ts.configs.strict                 | `"error"`        |
| ✅ ts.configs.strictTypeChecked      | `"error"`        |


```ts title=rslint.config.ts
import { defineConfig, ts } from '@rslint/core';

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/no-wrapper-object-types': 'error',
    },
  },
]);
```

## 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:

```typescript
let myBigInt: BigInt;
let myBoolean: Boolean;
let myNumber: Number;
let myString: String;
let mySymbol: Symbol;
let myObject: Object;

class MyClass implements Number {}

interface MyInterface extends Number {}
```

Examples of **correct** code for this rule:

```typescript
let myBigint: bigint;
let myBoolean: boolean;
let myNumber: number;
let myString: string;
let mySymbol: symbol;
let myObject: object;

type Number = 0 | 1;
let value: Number;
```

## Original Documentation

- [typescript-eslint: no-wrapper-object-types](https://typescript-eslint.io/rules/no-wrapper-object-types)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.67.0/packages/eslint-plugin/src/rules/no-wrapper-object-types.ts)
