JS: Add test showing missing re-export of base class relationship

This commit is contained in:
Asger F
2024-04-05 15:11:37 +02:00
parent 9313564e64
commit f2ea88aa4c
3 changed files with 12 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ typeModel
| (subclass).C | subclass | Member[C] |
| (subclass).C.prototype | (subclass).C | Instance |
| (subclass).C.prototype.c | (subclass).C.prototype | Member[c] |
| (subclass).D | subclass | Member[D] |
| (subclass).D.prototype | (subclass).D | Instance |
| (subclass).D.prototype.d | (subclass).D.prototype | Member[d] |
| upstream-lib | (reexport).func | ReturnValue |
| upstream-lib | reexport | Member[lib] |
| upstream-lib.XYZ | reexport | Member[x].Member[y].Member[z] |

View File

@@ -4,3 +4,4 @@ extensions:
extensible: typeModel
data:
- ["upstream-lib.XYZ", "upstream-lib", "Member[x].Member[y].Member[z]"]
- ["upstream-lib.Type", "upstream-lib", "Member[Type].Instance"]

View File

@@ -9,3 +9,11 @@ export class B extends A {
export class C extends B {
c() {}
}
import * as upstream from "upstream-lib";
// TODO: needs to emit type model: [upstream.Type; (subclass).D.prototype; ""]
// The getAValueReachableFromSource() logic does not handle the base class -> instance step
export class D extends upstream.Type {
d() {}
}