Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Inline subtype shape inferred as "signature" #95

Open
@dontsave

Description

@dontsave

hi, running into a small bug with sub types being inferred inline:

type SubType = {
  name: string;
};
type Props = {
  children?: ReactNode;
  /** testing */
  name: string;
  sub?: SubType;
};

function Component({ name = `` }: Props) {
  return <>hey</>;
}

is inferred as:

image

however exporting SubType from a separate file and importing it works correctly. This is only an issue with type aliases not interfaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions