diff --git a/types/sanitize-html/index.d.ts b/types/sanitize-html/index.d.ts
index 5e5e9ab2a3..5584eada56 100644
--- a/types/sanitize-html/index.d.ts
+++ b/types/sanitize-html/index.d.ts
@@ -57,7 +57,7 @@ declare namespace sanitize {
interface IOptions {
allowedAttributes?: { [index: string]: AllowedAttribute[] } | boolean;
allowedStyles?: { [index: string]: { [index: string]: RegExp[] } };
- allowedClasses?: { [index: string]: string[] } | boolean;
+ allowedClasses?: { [index: string]: string[] | boolean };
allowedIframeHostnames?: string[];
allowIframeRelativeUrls?: boolean;
allowedSchemes?: string[] | boolean;
diff --git a/types/sanitize-html/sanitize-html-tests.ts b/types/sanitize-html/sanitize-html-tests.ts
index ef6741c9cb..2f1126b389 100644
--- a/types/sanitize-html/sanitize-html-tests.ts
+++ b/types/sanitize-html/sanitize-html-tests.ts
@@ -6,6 +6,10 @@ let options: sanitize.IOptions = {
'a': sanitize.defaults.allowedAttributes['a'].concat('rel'),
'img': ['src', 'height', 'width', 'alt', 'style']
},
+ allowedClasses: {
+ a: ['className'],
+ p: false,
+ },
allowedStyles: {
'*': {
color: [/^red$/],