Skip to content

Commit

Permalink
Move Equals constraint into an intersection type.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Jan 24, 2024
1 parent c940a9f commit ca9aa48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/typeTestHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export declare const exactType: <T, U>(
) => IfEquals<T, U>

export function expectExactType<T>(t: T) {
return <U extends Equals<T, U>>(u: U) => {}
return <U extends T>(u: U & Equals<T, U>) => {}
}

type EnsureUnknown<T> = IsUnknown<T, any, never>
Expand Down

0 comments on commit ca9aa48

Please sign in to comment.