Skip to content

Commit

Permalink
Update comment related to DoNotInfer
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jan 31, 2025
1 parent febb84c commit 53b2c8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ export type Equals<A1, A2> =
: false;
export type IsAny<T> = Equals<T, any>;
export type Cast<A, B> = A extends B ? A : B;
// @TODO: Replace with native `NoInfer` when TS issue gets fixed:
// https://github.com/microsoft/TypeScript/pull/57673
// @TODO: we can't use native `NoInfer` as we need those:
// https://github.com/microsoft/TypeScript/pull/61092
// https://github.com/microsoft/TypeScript/pull/61077
// but even with those fixes native NoInfer still doesn't work - further issues have to be reproduced and fixed

This comment has been minimized.

Copy link
@Andarist

Andarist Jan 31, 2025

Author Member

Extra repro: TS playground

export type DoNotInfer<T> = [T][T extends any ? 0 : any];
/** @deprecated Use the built-in `NoInfer` type instead */
export type NoInfer<T> = DoNotInfer<T>;
Expand Down

0 comments on commit 53b2c8e

Please sign in to comment.