You are reading the docs for 0.9. The latest version is 0.10. Read this page for 0.10 →

WidenState<S, N extends string, St>

type
types.ts:2023

The state record after adding slice N with state St. Degrades to S when N is not a string literal, for the reason given on WidenNames.

Definition

type
type WidenState<S, N extends string, St> = string extends N ? S : Prettify<S & Record<N, St>>

string extends N ? S : Prettify<S & Record<N, St>>

Type parameters

NameTypeDescription
S–
Nextends string
St–