Converter icon indicating copy to clipboard operation
Converter copied to clipboard

Generalize type references

Open oyvindberg opened this issue 4 years ago • 1 comments

So far we've been pretty pedantic in the handling of things like re-exported types.

declare module "libfoo/impl/foo" {
  export class Foo {}
}
declare module "libfoo" {
  export import {Foo} from ''libfoo/impl/foo";
  export class Bar {
    constructor(foo: Foo) {}
  }
}

In most cases Bar has pointed to libfoo.Foo so far, while the intention was really something compatible with libfoo/impl/foo.Foo

In the name of pragmatism, assert that if a class has a parent with the same name and type parameters, accept that in the place of the child class.

oyvindberg avatar Oct 05 '20 22:10 oyvindberg

effect so far https://github.com/ScalablyTyped/Distribution/commit/ff1c1cea01b286dc1e90a49cbf6f496496e32dba

oyvindberg avatar Oct 05 '20 23:10 oyvindberg