There is a TS typing error when using asText(), asHTML() on a expected rich text field
prismicH.asText(this._blogPost.title)
Argument of type 'any' is not assignable to parameter of type ' | [RTNode, ...RTNode]'.Type 'any' is not assignable to type '[RTNode, ...RTNode]'.Source provides no match for required element at position 0 in target.
The current workaround is to use "as any" to remove the error:
"excerpt": [
{
"type": "paragraph",
"text": "March, April,May, it is time to rediscover these incredible European destinations for a budget. The wait is over !",
"spans":
}
],
Argument of type 'any' is not assignable to parameter of type ' | [RTNode, ...RTNode]'.Type 'any' is not assignable to type '[RTNode, ...RTNode]'.Source provides no match for required element at position 0 in target.
I am using StenciJS (www standard web component compiler) and coding in TS
Our dedicated team member is not sure about your exact context. You might need to type their "excerpt" property as apparently, and Stencil is typing it as any[], which is inaccurate. To do so, you can import { RichTextField } from "@prismicio/types" and use this type to type their excerpt prop/property.
But still, It doesn't solve your issue. It would be great to share proper context to troubleshoot it better.