Skip to content

@purista/core v2.0.5


PURISTA API / @purista/core / addPrefixToObject

Type Alias: addPrefixToObject<T, P>

addPrefixToObject<T, P>: { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K] }

Defined in: packages/core/src/core/types/addPrefixToObject.ts:7

Helper for better typescript type. All keys of given object must start with the given prefix. Otherwise Typescript will complain.


## Type Parameters

• **T**

• **P** *extends* `string`