# Type-safety bypass via `as any` in TypeScript — Agent PR X-Ray

> Canonical page: https://codevetter.com/xray/ts-type-confusion

This is an adjudicated synthetic benchmark example, not a claim about an uploaded repository.

## Source

- Corpus: codevetter-public-benchmark/ts-type-confusion
- Language: typescript
- Category: bug
- Evidence state: benchmark_ground_truth

## Finding

- Severity: medium
- Title: type confusion
- Summary: The payload is cast through `as any` to Order, bypassing the compiler so a Refund-shaped object is treated as an Order; at runtime items is undefined and the .length access throws or silently corrupts downstream totals.
- Source anchor: `source.ts:19`

## Verification boundary

The static finding is qualified against benchmark ground truth. No exact-current executable test or audience validation is included in this example, so those stages remain unverified.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
