Typeseedcordv0.10.6
PickIndexSignature
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
This is the counterpart of OmitIndexSignatureOmitIndexSignature.
See also:OmitIndexSignature Object
type PickIndexSignature<ObjectType> = {
[KeyType in keyof ObjectType as {} extends Record<
KeyType,
unknown
>
? KeyType
: never]: ObjectType[KeyType];
};type PickIndexSignature<ObjectType> = {
[KeyType in keyof ObjectType as {} extends Record<
KeyType,
unknown
>
? KeyType
: never]: ObjectType[KeyType];
};ObjectType
ObjectTypeObjectType