Skip to content

The intersection XXX was reduced to never because property contentType has conflicting types in some constituents #1931

Open
@garpunkal

Description

@garpunkal

Description

I have an issue with the intersections being created rather than unions.

The intersection HomeContentResponseModel was reduced to never because property contentType has conflicting types in some constituents.

I'm getting this error recently when using this library with Umbraco.

export type HomeContentModel = IApiContentModelBase & {
contentType: 'home';
} & {
properties?: HomePropertiesModel;
};

export type HomeContentResponseModel = IApiContentResponseModelBase & {
contentType: 'home';
} & HomeContentModel;

export type HomePropertiesModel = {
title?: string | null;
};

Reproducible example or configuration

https://github.com/garpunkal/umbraco-headless-starter/blob/main/src/content-delivery/openapi-ts.config.ts

https://github.com/garpunkal/umbraco-headless-starter/tree/main/src/content-delivery/src/scripts/api

OpenAPI specification (optional)

https://gist.github.com/garpunkal/b75a824d132d9fe2e8f386dcf3d58f6c

System information (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🔥Something isn't workingneeds info ⏳Further information is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions