Skip to content

Intellisense concatenates field description from subtypes #38848

Closed as not planned

Description

TypeScript Version: 3.9.2.

Search Terms: intellisense concat concatenation

Code

import React from 'react';

type Base<T> = {
    /**
     * Original description
     */
    b: T;
}
type BaseClone<T> = {
    /**
     * Clone description
     */
    b: T;
}

type Combined = Base<boolean> & BaseClone<boolean>;

const Component: React.FC<Combined> = (props: Combined) => <div></div>;

<Component b />;

image

Expected behavior: Not sure, to be honest.

Actual behavior: Intellisense for b on Component is the concatenation of the two types: Original description Clone description.

Playground Link: Playground

This doesn't seem like a huge bug, but I just wanted to flag it in case there's behavior that makes more sense here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions