JS: Add test where root export object is a function

This commit is contained in:
Asger F
2024-04-05 11:48:18 +02:00
parent f4e05cc621
commit ab3c03d2d6
3 changed files with 17 additions and 0 deletions

View File

@@ -16,6 +16,10 @@ typeModel
| (return-this).FluentInterface.prototype.foo | (return-this).FluentInterface.prototype | Member[foo] |
| (return-this).FluentInterface.prototype.notFluent | (return-this).FluentInterface.prototype | Member[notFluent] |
| (return-this).FluentInterface.prototype.notFluent2 | (return-this).FluentInterface.prototype | Member[notFluent2] |
| (root-function).PublicClass | root-function | Member[PublicClass] |
| (root-function).PublicClass.prototype | (root-function).PublicClass | Instance |
| (root-function).PublicClass.prototype | root-function | ReturnValue |
| (root-function).PublicClass.prototype.method | (root-function).PublicClass.prototype | Member[method] |
| (semi-internal-class).PublicClass | semi-internal-class | Member[PublicClass] |
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).PublicClass | Instance |
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).SemiInternalClass.prototype.method | ReturnValue |

View File

@@ -0,0 +1,4 @@
{
"name": "root-function",
"main": "root-function.js"
}

View File

@@ -0,0 +1,9 @@
class C {
method() {}
}
module.exports = function() {
return new C();
}
module.exports.PublicClass = C;