Skip to content

Commit 348c95e

Browse files
committed
JS: Add a test case with fluent flow
1 parent c55e03c commit 348c95e

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
typeModel
22
| (reexport).func | reexport | Member[func] |
3+
| (return-this).FluentInterface | return-this | Member[FluentInterface] |
4+
| (return-this).FluentInterface.prototype | (return-this).FluentInterface | Instance |
5+
| (return-this).FluentInterface.prototype | (return-this).FluentInterface.prototype.bar | ReturnValue |
6+
| (return-this).FluentInterface.prototype | (return-this).FluentInterface.prototype.baz | ReturnValue |
7+
| (return-this).FluentInterface.prototype.bar | (return-this).FluentInterface.prototype | Member[bar] |
8+
| (return-this).FluentInterface.prototype.baz | (return-this).FluentInterface.prototype | Member[baz] |
9+
| (return-this).FluentInterface.prototype.foo | (return-this).FluentInterface.prototype | Member[foo] |
10+
| (return-this).FluentInterface.prototype.notFluent | (return-this).FluentInterface.prototype | Member[notFluent] |
11+
| (return-this).FluentInterface.prototype.notFluent2 | (return-this).FluentInterface.prototype | Member[notFluent2] |
312
| upstream-lib | (reexport).func | ReturnValue |
413
| upstream-lib | reexport | Member[lib] |
514
| upstream-lib.XYZ | reexport | Member[x].Member[y].Member[z] |
615
| upstream-lib.XYZ | reexport | Member[xy].Member[z] |
716
summaryModel
17+
| (return-this).FluentInterface.prototype | | | Member[bar].ReturnValue | type |
18+
| (return-this).FluentInterface.prototype | | | Member[baz].ReturnValue | type |
19+
| (return-this).FluentInterface.prototype | | | Member[foo].ReturnValue | type |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "return-this",
3+
"main": "return-this.js"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export class FluentInterface {
2+
foo() {
3+
return this;
4+
}
5+
bar() {
6+
return this.foo();
7+
}
8+
baz() {
9+
return this.foo().bar().bar().foo();
10+
}
11+
notFluent() {
12+
this.foo();
13+
}
14+
notFluent2() {
15+
return this.notFluent2();
16+
}
17+
}

0 commit comments

Comments
 (0)