drag-styling.d.ts 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. declare type Writeable<T> = {
  9. -readonly [P in keyof T]-?: T[P];
  10. };
  11. /**
  12. * Extended CSSStyleDeclaration that includes a couple of drag-related
  13. * properties that aren't in the built-in TS typings.
  14. */
  15. interface DragCSSStyleDeclaration extends CSSStyleDeclaration {
  16. webkitUserDrag: string;
  17. MozUserSelect: string;
  18. }
  19. /**
  20. * Shallow-extends a stylesheet object with another stylesheet object.
  21. * @docs-private
  22. */
  23. export declare function extendStyles(dest: Writeable<CSSStyleDeclaration>, source: Partial<DragCSSStyleDeclaration>): Writeable<CSSStyleDeclaration>;
  24. /**
  25. * Toggles whether the native drag interactions should be enabled for an element.
  26. * @param element Element on which to toggle the drag interactions.
  27. * @param enable Whether the drag interactions should be enabled.
  28. * @docs-private
  29. */
  30. export declare function toggleNativeDragInteractions(element: HTMLElement, enable: boolean): void;
  31. export {};