Type alias Empty<ArrayRecordOrString>

Empty<ArrayRecordOrString>: ArrayRecordOrString extends ReadOnlyArray ? EmptyArray : ArrayRecordOrString extends ReadOnlyRecord ? EmptyRecord : ArrayRecordOrString extends string ? EmptyString : never

Empty array, object or string.

Example

const emptyString: Empty<string> = "";
const emptyArray: Empty<ReadOnlyArray> = [];
const emptyRecord: Empty<ReadOnlyRecord> = {};

Type Parameters