unsafe-html.d.ts 1.1 KB

123456789101112131415161718192021222324252627
  1. /**
  2. * @license
  3. * Copyright 2017 Google LLC
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. import { nothing, TemplateResult, noChange } from '../lit-html.js';
  7. import { Directive, PartInfo } from '../directive.js';
  8. export declare class UnsafeHTMLDirective extends Directive {
  9. static directiveName: string;
  10. static resultType: number;
  11. private _value;
  12. private _templateResult?;
  13. constructor(partInfo: PartInfo);
  14. render(value: string | typeof nothing | typeof noChange | undefined | null): typeof noChange | typeof nothing | TemplateResult<1 | 2> | null | undefined;
  15. }
  16. /**
  17. * Renders the result as HTML, rather than text.
  18. *
  19. * The values `undefined`, `null`, and `nothing`, will all result in no content
  20. * (empty string) being rendered.
  21. *
  22. * Note, this is unsafe to use with any user-provided input that hasn't been
  23. * sanitized or escaped, as it may lead to cross-site-scripting
  24. * vulnerabilities.
  25. */
  26. export declare const unsafeHTML: (value: string | typeof noChange | typeof nothing | null | undefined) => import("../directive.js").DirectiveResult<typeof UnsafeHTMLDirective>;
  27. //# sourceMappingURL=unsafe-html.d.ts.map