Skip to content

Missing error when passing unconstrained generic to imported type #29530

Closed
@OliverJAsh

Description

@OliverJAsh

TypeScript Version: 3.2.2

Search Terms: generic import types extends constraint constrained

Code

// ./lib.ts
export type Foo<T extends string> = { foo: T }

// ./index.ts
type Foo<T> = import('./lib').Foo<T>;
// Should require matching constraint:
// type Foo<T extends string> = import('./lib').Foo<T>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions