Skip to content

component-lifecycle


component-lifecycle / ExtendableComponentOptions

Type Alias: ExtendableComponentOptions<TCustom>

ExtendableComponentOptions<TCustom> = NoComponentOptions<TCustom> & Omit<ComponentOptions, keyof TCustom>

Helper type to extend the component's base options with custom options. Automatically includes all component's base options while allowing additional custom options.

Type Parameters

TCustom

TCustom extends Record<string, unknown> = Record<string, never>

Custom options to merge with component's base options.

Example

typescript
// ✅ Valid - no conflicts
type MyOptions = ExtendableComponentOptions<{
  "data-url": string;
}>;

// ❌ Invalid - 'bubbleEvents' conflicts
type InvalidEvents = ExtendableComponentOptions<{ bubbleEvents: {} }>;
// Results in: { bubbleEvents: "❌ Option key \"bubbleEvents\" conflicts with component's base option. Use a different name." }