CustomElement.d.ts 1.0 KB

12345678910111213141516171819202122232425
  1. import type { DisplayObjectConfig } from '../dom';
  2. import type { BaseStyleProps } from '../types';
  3. import { DisplayObject } from './DisplayObject';
  4. export interface BaseCustomElementStyleProps extends BaseStyleProps {
  5. x?: number | string;
  6. y?: number | string;
  7. }
  8. /**
  9. * shadow root
  10. * @see https://yuque.antfin-inc.com/antv/czqvg5/pgqipg
  11. */
  12. export declare abstract class CustomElement<CustomElementStyleProps> extends DisplayObject<CustomElementStyleProps & BaseCustomElementStyleProps> {
  13. isCustomElement: boolean;
  14. constructor({ style, ...rest }?: DisplayObjectConfig<CustomElementStyleProps>);
  15. /**
  16. * fired after element insert into DOM tree
  17. */
  18. connectedCallback?(): void;
  19. /**
  20. * fired before element removed from DOM tree
  21. */
  22. disconnectedCallback?(): void;
  23. attributeChangedCallback?<Key extends keyof CustomElementStyleProps>(name: Key, oldValue: CustomElementStyleProps[Key], newValue: CustomElementStyleProps[Key], oldParsedValue?: any, newParsedValue?: any): void;
  24. }
  25. //# sourceMappingURL=CustomElement.d.ts.map