state.d.ts 1.1 KB

12345678910111213141516171819202122232425
  1. /**
  2. * @license
  3. * Copyright 2017 Google LLC
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. export interface InternalPropertyDeclaration<Type = unknown> {
  7. /**
  8. * A function that indicates if a property should be considered changed when
  9. * it is set. The function should take the `newValue` and `oldValue` and
  10. * return `true` if an update should be requested.
  11. */
  12. hasChanged?(value: Type, oldValue: Type): boolean;
  13. }
  14. /**
  15. * Declares a private or protected reactive property that still triggers
  16. * updates to the element when it changes. It does not reflect from the
  17. * corresponding attribute.
  18. *
  19. * Properties declared this way must not be used from HTML or HTML templating
  20. * systems, they're solely for properties internal to the element. These
  21. * properties may be renamed by optimization tools like closure compiler.
  22. * @category Decorator
  23. */
  24. export declare function state(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | import("./base.js").ClassElement, name?: PropertyKey | undefined) => any;
  25. //# sourceMappingURL=state.d.ts.map