Assert that a type is a Record.
Record
Type that must be a record
Ensures the type is indexable by string, number, or symbol keys. Useful for validating dictionary-like structures.
string
number
symbol
type A = AssertRecord< Record< string, number > >; // ✓type B = AssertRecord< { a: number } >; // ✓type C = AssertRecord< string >; // ✗ TS error Copy
type A = AssertRecord< Record< string, number > >; // ✓type B = AssertRecord< { a: number } >; // ✓type C = AssertRecord< string >; // ✗ TS error
Assert that a type is a
Record.