> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# double-type-assertion

> A value is cast through unknown or any to a second type, bypassing the type checker.

## What it flags

`value as unknown as T` and `value as any as T`, which turn off the type checker for that value. Declaration files, fixtures, docs, examples, generated and vendored code are skipped. A cast whose target type refers to a type parameter of an enclosing function, method, class or interface, such as `as unknown as Partial<Row>` inside a generic over `Row`, is also skipped, because TypeScript cannot relate a value to an unresolved type parameter. A cast to a bare type parameter with an `extends` constraint, such as `item as unknown as T` inside a generic over `T extends MenuItem`, still reports: a plain `item as T` is checked against the constraint, and the double cast skips that check. It stays quiet when the value's own type is generic in the same file, such as another type parameter, because TypeScript rejects a direct cast between two type parameters.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "double-type-assertion": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.