Search Docs
Loading...
Skip to content

Type Alias: FeatureShapeOf

type FeatureShapeOf<D> = object;

Derives a FeatureShape from a definition written as const.

Example#

const myFeature = {
id: 'my.plugin.stamp',
sizes: { type: 'array', items: { type: 'number' }, default: [12, 24] }
} as const satisfies FeatureDefinition;
declare module '@cesdk/cesdk-js' {
interface FeatureRegistry {
'my.plugin.stamp': FeatureShapeOf<typeof myFeature>;
}
}

Type Parameters#

Type Parameter
D

Properties#

Property Type
settings { -readonly [K in keyof D as K extends “id”
options D extends object ? { -readonly [K in keyof O]: FeatureShapeOf<O[K]> } : object