You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NoInfer was introduced in TypeScript 5.4 and prohibits inferring literals
It needs to be documented in ts-essentials for completeness
Examples
declarefunctioncreateFSM<TStateextendsstring>(config: {initial: NoInfer<TState>;states: TState[];}): TState;createFSM({// Type '"not-allowed"' is not assignable to type '"open" | "closed"' 🔴initial: "not-allowed",states: ["open","closed"],});createFSM({initial: "initial",states: ["initial","open","closed"],});
What
NoInfer was introduced in TypeScript 5.4 and prohibits inferring literals
It needs to be documented in ts-essentials for completeness
Examples
Additional Info
https://www.totaltypescript.com/noinfer
The text was updated successfully, but these errors were encountered: