import { Constructable, FASTElement, PartialFASTElementDefinition } from '@microsoft/fast-element'; export type DefineFunction = (definition: PartialFASTElementDefinition) => TType; export type DefinitionOverrider = (override: PartialFASTElementDefinition) => PartialFASTElementDefinition; /** * Defines a platform custom element based on the provided type and definition. * * @example * An example using custom definition merge logic, useful if you need to impose hard restrictions. * ```ts * const definitionOverrider = (definition) => ({ * ...baseDefinition, * ...definition, * styles: baseDefinition.styles, * shadowOptions: { * mode: 'closed, * }, * }); * export const define = defineFactory(LoginForm, definitionOverrider); * ``` * * @example * You can provide the base definition if you're happy with the default spread operator merge logic. * ```ts * export const define = defineFactory(LoginForm, baseDefinition); * ``` * * @param Type - The custom element Type / Class to define. * @param overriderOrBase - A function that merges definitions, or the base definition if custom merging is not needed. * @returns The type class. */ export declare const defineFactory: >(Type: TType, overriderOrBase: DefinitionOverrider | PartialFASTElementDefinition) => DefineFunction; //# sourceMappingURL=define.d.ts.map