typescript
type_error
ai_generated
true
error TS1360: Type 'X' does not satisfy the expected type 'Y'.
ID: typescript/ts1360-satisfies-type-error
92%Fix Rate
89%Confidence
35Evidence
2022-11-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 5 | active | — | — | — |
Root Cause
The satisfies operator checks exact structural compatibility without widening types. The error means the value does not match the expected shape. Unlike 'as', satisfies does perform excess property checks.
genericWorkarounds
-
93% success Fix the object to match all required properties of the target type
The satisfies operator performs exact structural checking. Add missing properties, fix misspelled property names, and ensure value types match. Use Partial<T> if partial conformance is intentional.
-
88% success Use 'as const satisfies T' for literal type narrowing with validation
This pattern preserves literal types (important for union discrimination) while still validating against the broader type. Example: const config = { mode: 'development' } as const satisfies Config. -
90% success Remove excess properties not in the target type
Unlike 'as', satisfies performs excess property checks. Properties not defined in the target type cause errors. Remove them or extend the target type definition to include them.
Dead Ends
Common approaches that don't work:
-
Replacing 'satisfies' with 'as' type assertion
90% fail
'as' silences the error but loses type safety entirely. The whole purpose of 'satisfies' is to validate without widening. Using 'as' defeats that purpose and allows runtime values that don't match the type to pass through unchecked.
-
Making the target type more permissive by adding union members
75% fail
Widening the type (adding '| string', '| undefined', etc.) hides the real problem: the data does not match the expected shape. It passes the issue to consumers who now must handle unexpected types.
Error Chain
Frequently confused with: