mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Correct allowedAttributes type (#38370)
Correct the allowedAttribute to match https://www.npmjs.com/package/sanitize-html#what-if-i-want-to-allow-only-specific-values-on-some-attributes
This commit is contained in:
parent
2581ebe5f0
commit
2acfcc2764
5
types/sanitize-html/index.d.ts
vendored
5
types/sanitize-html/index.d.ts
vendored
@ -29,9 +29,10 @@ declare namespace sanitize {
|
||||
|
||||
type Transformer = (tagName: string, attribs: Attributes) => Tag;
|
||||
|
||||
type AllowedAttribute = string | { name: string; multiple?: boolean; values: string[] };
|
||||
|
||||
interface IDefaults {
|
||||
allowedAttributes: { [index: string]: string[] };
|
||||
allowedAttributes: { [index: string]: AllowedAttribute[] };
|
||||
allowedSchemes: string[];
|
||||
allowedSchemesByTag: { [index: string]: string[] };
|
||||
allowedTags: string[];
|
||||
@ -48,7 +49,7 @@ declare namespace sanitize {
|
||||
|
||||
|
||||
interface IOptions {
|
||||
allowedAttributes?: { [index: string]: string[] } | boolean;
|
||||
allowedAttributes?: { [index: string]: AllowedAttribute[] } | boolean;
|
||||
allowedStyles?: { [index: string]: { [index: string]: RegExp[] } };
|
||||
allowedClasses?: { [index: string]: string[] } | boolean;
|
||||
allowedIframeHostnames?: string[];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user