From 23a1883dfcff0abcb55f461fad13bbd1247444ac Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Sun, 29 Nov 2020 14:54:05 +0800 Subject: [PATCH] pick #286 allow short cut for slim DOM options --- src/record/index.ts | 2 ++ src/types.ts | 2 +- typings/types.d.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/record/index.ts b/src/record/index.ts index 6214506b36..c6f566731d 100644 --- a/src/record/index.ts +++ b/src/record/index.ts @@ -95,6 +95,8 @@ function record( headMetaAuthorship: _slimDOMOptions === 'all', headMetaDescKeywords: _slimDOMOptions === 'all', } + : _slimDOMOptions + ? _slimDOMOptions : {}; polyfill(); diff --git a/src/types.ts b/src/types.ts index 4f1b8a64d8..0bacc34da0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -177,7 +177,7 @@ export type recordOptions = { maskAllInputs?: boolean; maskInputOptions?: MaskInputOptions; maskInputFn?: MaskInputFn; - slimDOMOptions?: SlimDOMOptions; + slimDOMOptions?: SlimDOMOptions | 'all' | true; inlineStylesheet?: boolean; hooks?: hooksParam; packFn?: PackFn; diff --git a/typings/types.d.ts b/typings/types.d.ts index 7d99617362..2d8d59bca6 100644 --- a/typings/types.d.ts +++ b/typings/types.d.ts @@ -115,7 +115,7 @@ export declare type recordOptions = { maskAllInputs?: boolean; maskInputOptions?: MaskInputOptions; maskInputFn?: MaskInputFn; - slimDOMOptions?: SlimDOMOptions; + slimDOMOptions?: SlimDOMOptions | 'all' | true; inlineStylesheet?: boolean; hooks?: hooksParam; packFn?: PackFn;