From a3d7bf13c94720525d566087693d007d200313e8 Mon Sep 17 00:00:00 2001 From: Siggy Bilstein Date: Mon, 11 Jun 2018 17:11:54 -0700 Subject: [PATCH 1/2] Add a type for PrismicDOM.RichText text function --- types/prismic-dom/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/prismic-dom/index.d.ts b/types/prismic-dom/index.d.ts index 2849cc7791..5c16729029 100644 --- a/types/prismic-dom/index.d.ts +++ b/types/prismic-dom/index.d.ts @@ -1,10 +1,12 @@ // Type definitions for prismic-dom 2.0 // Project: https://github.com/prismicio/prismic-dom#readme // Definitions by: Nick Whyte +// Siggy Bilstein // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface RichText { asHtml(richText: any, linkResolver?: (doc: any) => string): string; + asText(richText: any, linkResolver?: (doc: any) => string): string; } export const RichText: RichText; From 3f2440063956259b4fb7b6de6fab0452890b61dc Mon Sep 17 00:00:00 2001 From: Siggy Bilstein Date: Mon, 11 Jun 2018 17:36:04 -0700 Subject: [PATCH 2/2] Fix type to actually match the implementation --- types/prismic-dom/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prismic-dom/index.d.ts b/types/prismic-dom/index.d.ts index 5c16729029..ba101e1041 100644 --- a/types/prismic-dom/index.d.ts +++ b/types/prismic-dom/index.d.ts @@ -6,7 +6,7 @@ interface RichText { asHtml(richText: any, linkResolver?: (doc: any) => string): string; - asText(richText: any, linkResolver?: (doc: any) => string): string; + asText(richText: any, joinString?: string): string; } export const RichText: RichText;