Open thebuilder opened 1 month ago
The augment to the library is no longer able to correctly infer the contentType generated by openapi-typescript.
contentType
openapi-typescript
import { components } from '@/openapi/umbraco'; type ApiBlockItemModel = components['schemas']['ApiBlockItemModel']; declare module '@charlietango/react-umbraco' { interface UmbracoBlockItemModel extends ApiBlockItemModel {} }
Error
app/components/RichText.tsx:37:20 - error TS2339: Property 'contentType' does not exist on type '{ id: string; properties: { [key: string]: unknown; }; }'. 37 switch (content?.contentType) { ~~~~~~~~~~~
It correctly augment the type, but it's unable to narrow contentType.
This might be related to using an older verision of openapi-typescript
The augment to the library is no longer able to correctly infer the
contentType
generated byopenapi-typescript
.Error
It correctly augment the type, but it's unable to narrow
contentType
.