attribute_impl.d.ts 771 B

1234567891011121314151617181920
  1. /**
  2. * @license
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. import '../environment/dev';
  6. /** A prefix with which an attribute is safe to set using plain strings. */
  7. export declare abstract class SafeAttributePrefix {
  8. private readonly brand;
  9. }
  10. /**
  11. * Builds a new `SafeAttribute` from the given string, without enforcing
  12. * safety guarantees. This shouldn't be exposed to application developers, and
  13. * must only be used as a step towards safe builders or safe constants.
  14. */
  15. export declare function createAttributePrefix(attrPrefix: string): SafeAttributePrefix;
  16. /**
  17. * Returns the string value of the passed `SafeAttributePrefix` object while
  18. * ensuring it has the correct type.
  19. */
  20. export declare function unwrapAttributePrefix(value: SafeAttributePrefix): string;