From 8cc8df695f46a396cf787265c6ec5fb3089881f0 Mon Sep 17 00:00:00 2001 From: Fernando Date: Thu, 14 Nov 2019 13:46:07 +0200 Subject: [PATCH 1/2] Add null|undefined to BlockRenderer return type --- packages/draft-js-export-html/typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/draft-js-export-html/typings/index.d.ts b/packages/draft-js-export-html/typings/index.d.ts index ec40b149..4224b012 100644 --- a/packages/draft-js-export-html/typings/index.d.ts +++ b/packages/draft-js-export-html/typings/index.d.ts @@ -5,7 +5,7 @@ declare module 'draft-js-export-html' { type BlockStyleFn = (block: draftjs.ContentBlock) => RenderConfig|undefined; type EntityStyleFn = (entity: draftjs.EntityInstance) => RenderConfig|undefined; - type BlockRenderer = (block: draftjs.ContentBlock) => string; + type BlockRenderer = (block: draftjs.ContentBlock) => string|null|undefined; type RenderConfig = { element?: string; attributes?: any; From c0ef430236337bccfbd1f69db85caf63c6652d12 Mon Sep 17 00:00:00 2001 From: Fernando Date: Thu, 14 Nov 2019 13:46:36 +0200 Subject: [PATCH 2/2] Add null to return type of defaultBlockTag --- packages/draft-js-export-html/typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/draft-js-export-html/typings/index.d.ts b/packages/draft-js-export-html/typings/index.d.ts index 4224b012..ce8dc0e5 100644 --- a/packages/draft-js-export-html/typings/index.d.ts +++ b/packages/draft-js-export-html/typings/index.d.ts @@ -13,7 +13,7 @@ declare module 'draft-js-export-html' { }; export interface Options { - defaultBlockTag?: string; + defaultBlockTag?: string|null; inlineStyles?: { [styleName: string]: RenderConfig }; blockRenderers?: { [blockType: string]: BlockRenderer }; blockStyleFn?: BlockStyleFn;