Skip to content

Catastrophic performance decrease when adding overloads to a method (sometimes crashes tsc) #9791

Closed
@Ptival

Description

@Ptival

TypeScript Version: 1.9.0

Code

interface IWhatever { }

interface IBug<T extends IWhatever> {
  foo$: Rx.Observable<{}>;
}

export class Bug<T extends IWhatever> implements IBug<T> {
  foo$: Rx.Subject<{}>;
}

Using:

    "rx": "registry:dt/rx#0.0.0+20160317120654",
    "rx-lite": "registry:dt/rx-lite#0.0.0+20160628114230",
    "rx.async-lite": "registry:dt/rx.async-lite#0.0.0+20160316171810",
    "rx.backpressure-lite": "registry:dt/rx.backpressure-lite#0.0.0+20160316171810",
    "rx.binding-lite": "registry:dt/rx.binding-lite#0.0.0+20160316171810",
    "rx.coincidence": "registry:dt/rx.coincidence#2.2.28+20160317120654",
    "rx.coincidence-lite": "registry:dt/rx.coincidence-lite#0.0.0+20160412135432",
    "rx.time": "registry:dt/rx.time#2.2.28+20160317120654",
    "rx.time-lite": "registry:dt/rx.time-lite#0.0.0+20160316171810",

Expected behavior:

Compiles, maybe an error...

Actual behavior:

tsc either takes a very long time and amount of resources, or runs out of memory type-checking the file.

Possibly related? #8143

I did not manage to boil down Rx.Subject and Rx.Observable to something small and self-contained, sorry about that...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions