/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | jsDeclarationsFunctionsCjs.ts | 21 module.exports.a = function a() { 22 AssertType(module.exports.a = function a() {}, "() => void"); 24 AssertType(module.exports.a, "() => void"); 31 module.exports.b = function b() { 32 AssertType(module.exports.b = function b() {}, "{ (): void; cat: string; }"); 34 AssertType(module.exports.b, "{ (): void; cat: string; }"); 41 module.exports.b.cat = "cat"; 42 AssertType(module.exports.b.cat = "cat", "string"); 43 AssertType(module.exports.b.cat, "string"); 46 module.exports.c = function c() { [all …]
|
D | jsDeclarationsExportDefinePropertyEmit.ts | 21 Object.defineProperty(module.exports, "a", { value: function a() {} }); 22 AssertType(Object.defineProperty(module.exports, "a", { value: function a() {} }), "typeof module.e… 24 AssertType(module.exports, "typeof module.exports"); 31 Object.defineProperty(module.exports, "b", { value: function b() {} }); 32 AssertType(Object.defineProperty(module.exports, "b", { value: function b() {} }), "typeof module.e… 34 AssertType(module.exports, "typeof module.exports"); 41 Object.defineProperty(module.exports.b, "cat", { value: "cat" }); 42 AssertType(Object.defineProperty(module.exports.b, "cat", { value: "cat" }), "() => void"); 44 AssertType(module.exports.b, "() => void"); 63 Object.defineProperty(module.exports, "d", { value: d }); [all …]
|
D | assignmentToVoidZero1.ts | 22 exports.y = exports.x = void 0; 23 AssertType(exports.y = exports.x = void 0, "undefined"); 24 AssertType(exports.y, "int"); 25 AssertType(exports.x = void 0, "undefined"); 26 AssertType(exports.x, "int"); 30 exports.x = 1; 31 AssertType(exports.x = 1, "int"); 32 AssertType(exports.x, "int"); 35 exports.y = 2; 36 AssertType(exports.y = 2, "int"); [all …]
|
D | moduleResolutionWithSuffixes_one_externalModule.ts | 24 exports.__esModule = true; 25 AssertType(exports.__esModule = true, "boolean"); 26 AssertType(exports.__esModule, "boolean"); 30 exports.ios = ios; 31 AssertType(exports.ios = ios, "() => void"); 32 AssertType(exports.ios, "() => void"); 46 exports.__esModule = true; 47 AssertType(exports.__esModule = true, "boolean"); 48 AssertType(exports.__esModule, "boolean"); 52 exports.base = base; [all …]
|
D | moduleResolutionWithSuffixes_one_externalModulePath.ts | 24 exports.__esModule = true; 25 AssertType(exports.__esModule = true, "boolean"); 26 AssertType(exports.__esModule, "boolean"); 30 exports.iosfoo = iosfoo; 31 AssertType(exports.iosfoo = iosfoo, "() => void"); 32 AssertType(exports.iosfoo, "() => void"); 46 exports.__esModule = true; 47 AssertType(exports.__esModule = true, "boolean"); 48 AssertType(exports.__esModule, "boolean"); 52 exports.basefoo = basefoo; [all …]
|
D | moduleResolutionWithSuffixes_one_externalModule_withPaths.ts | 24 exports.__esModule = true; 25 AssertType(exports.__esModule = true, "boolean"); 26 AssertType(exports.__esModule, "boolean"); 30 exports.ios = ios; 31 AssertType(exports.ios = ios, "() => void"); 32 AssertType(exports.ios, "() => void"); 46 exports.__esModule = true; 47 AssertType(exports.__esModule = true, "boolean"); 48 AssertType(exports.__esModule, "boolean"); 52 exports.base = base; [all …]
|
D | jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.ts | 21 module.exports = class { 22 AssertType(module.exports = class { /** * @param {number} p */ constructor(p) { … 23 AssertType(module.exports, "typeof import("tests/cases/conformance/jsdoc/declarations/index")"); 41 module.exports.Sub = class { 42 AssertType(module.exports.Sub = class { constructor() { this.instance = new module.export… 43 AssertType(module.exports.Sub, "typeof Sub"); 44 AssertType(class { constructor() { this.instance = new module.exports(10); }}, "typeof… 47 this.instance = new module.exports(10); 48 AssertType(this.instance = new module.exports(10), "import("tests/cases/conformance/jsdoc/declarati… 51 AssertType(new module.exports(10), "import("tests/cases/conformance/jsdoc/declarations/index")"); [all …]
|
D | collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts | 25 import exports = mOfGloalFile.c; 27 new exports(); 28 AssertType(new exports(), "exports"); 29 AssertType(exports, "typeof exports"); 36 import exports = mOfGloalFile.c; 38 new exports(); 43 export import exports = mOfGloalFile.c; 45 new exports();
|
D | moduleExportAliasElementAccessExpression.ts | 22 exports["D"] = D; 23 AssertType(exports["D"] = D, "() => void"); 24 AssertType(exports["D"], "() => void"); 25 AssertType(exports, "typeof import("tests/cases/conformance/salsa/moduleExportAliasElementAccessExp… 30 exports["Does not work yet"] = D; 31 AssertType(exports["Does not work yet"] = D, "() => void"); 32 AssertType(exports["Does not work yet"], "() => void"); 33 AssertType(exports, "typeof import("tests/cases/conformance/salsa/moduleExportAliasElementAccessExp…
|
D | jsDeclarationsExportDoubleAssignmentInClosure.ts | 23 module.exports = exports = function (o) { 24 AssertType(module.exports, "{ (any): any; methods: () => void; }"); 25 AssertType(exports = function (o) { return (o == null) ? create(base) : defineProperties(Obj… 26 AssertType(exports, "any"); 29 AssertType(module.exports = exports = function (o) { return (o == null) ? create(base) : def… 54 exports.methods = m; 55 AssertType(exports.methods = m, "() => void"); 56 AssertType(exports.methods, "any");
|
D | jsDeclarationsExportAssignedClassInstance3.ts | 26 module.exports = new Foo(); 27 AssertType(module.exports = new Foo(), "{ member: number; additional: 20; }"); 28 AssertType(module.exports, "{ member: number; additional: 20; }"); 32 module.exports.additional = 20; 33 AssertType(module.exports.additional = 20, "int"); 34 AssertType(module.exports.additional, "int");
|
D | jsExportAssignmentNonMutableLocation.ts | 28 module.exports = { 29 AssertType(module.exports = { customSymbol,}, "typeof module.exports"); 30 AssertType(module.exports, "typeof module.exports"); 38 exports.customSymbol2 = Symbol("custom"); 39 AssertType(exports.customSymbol2 = Symbol("custom"), "unique symbol"); 40 AssertType(exports.customSymbol2, "unique symbol");
|
D | jsDeclarationsExportSubAssignments.ts | 35 module.exports = Foo; 36 AssertType(module.exports = Foo, "typeof Foo"); 37 AssertType(module.exports, "typeof Foo"); 40 module.exports.Strings = Strings; 41 AssertType(module.exports.Strings = Strings, "{ a: string; b: string; }"); 42 AssertType(module.exports.Strings, "{ a: string; b: string; }");
|
D | jsDeclarationsExportAssignedConstructorFunction.ts | 22 module.exports.MyClass = function() { 23 AssertType(module.exports.MyClass = function() { this.x = 1}, "typeof MyClass"); 24 AssertType(module.exports.MyClass, "typeof MyClass"); 33 module.exports.MyClass.prototype = { 34 AssertType(module.exports.MyClass.prototype = { a: function() { }}, "{ a: () => void; }"); 35 AssertType(module.exports.MyClass.prototype, "{ a: () => void; }");
|
D | jsDeclarationsClassStatic.ts | 51 module.exports = Handler; 52 AssertType(module.exports = Handler, "typeof Handler"); 53 AssertType(module.exports, "typeof Handler"); 56 module.exports.Strings = Strings 57 AssertType(module.exports.Strings = Strings, "{ a: string; b: string; }"); 58 AssertType(module.exports.Strings, "{ a: string; b: string; }");
|
D | jsDeclarationsExportAssignmentExpressionPlusSecondary.ts | 34 module.exports = { 35 AssertType(module.exports = { thing: "ok", also: "ok", desc: { item: "ok" }}, "{… 36 AssertType(module.exports, "{ thing: string; also: string; desc: { item: string; }; Strings: { a: s… 56 module.exports.Strings = Strings; 57 AssertType(module.exports.Strings = Strings, "{ a: string; b: string; }"); 58 AssertType(module.exports.Strings, "{ a: string; b: string; }");
|
D | jsDeclarationsExportAssignedClassExpressionShadowing.ts | 27 module.exports = class Q { 28 AssertType(module.exports = class Q { constructor() { this.x = new A(); }}, "typeof im… 29 AssertType(module.exports, "typeof import("tests/cases/conformance/jsdoc/declarations/index")"); 42 module.exports.Another = Q; 43 AssertType(module.exports.Another = Q, "typeof Q"); 44 AssertType(module.exports.Another, "typeof Q");
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/moduleExportDuplicateAlias3/ |
D | moduleExportAliasDuplicateAlias.js | 21 exports.apply = undefined; 22 AssertType(exports.apply = undefined, "undefined"); 23 AssertType(exports.apply, "union"); 26 exports.apply = undefined; 27 AssertType(exports.apply = undefined, "undefined"); 28 AssertType(exports.apply, "union"); 32 exports.apply = a; 33 AssertType(exports.apply = a, "() => void"); 34 AssertType(exports.apply, "union"); 37 exports.apply() [all …]
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/moduleExportsElementAccessAssignment/ |
D | mod1.js | 21 exports.a = { x: "x" }; 22 AssertType(exports.a = { x: "x" }, "{ x: string; }"); 23 AssertType(exports.a, "{ x: string; }"); 28 exports["b"] = { x: "x" }; variable 29 AssertType(exports["b"] = { x: "x" }, "{ x: string; }"); 30 AssertType(exports["b"], "{ x: string; }"); 31 AssertType(exports, "typeof import("tests/cases/conformance/jsdoc/mod1")"); 37 exports["default"] = { x: "x" }; variable 38 AssertType(exports["default"] = { x: "x" }, "{ x: string; }"); 39 AssertType(exports["default"], "{ x: string; }"); [all …]
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/moduleExportDuplicateAlias2/ |
D | moduleExportAliasDuplicateAlias.js | 21 module.exports.apply = undefined; 22 AssertType(module.exports.apply = undefined, "undefined"); 23 AssertType(module.exports.apply, "any"); 27 module.exports.apply = a; 28 AssertType(module.exports.apply = a, "() => void"); 29 AssertType(module.exports.apply, "any"); 32 module.exports.apply = a; 33 AssertType(module.exports.apply = a, "() => void"); 34 AssertType(module.exports.apply, "any"); 37 module.exports.apply() [all …]
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/commonJSAliasedExport/ |
D | commonJSAliasedExport.js | 31 module.exports = donkey; 32 AssertType(module.exports = donkey, "{ (any): any; funky: (any) => boolean; }"); 33 AssertType(module.exports, "{ (any): any; funky: (any) => boolean; }"); 36 module.exports.funky = funky; 37 AssertType(module.exports.funky = funky, "(any) => boolean"); 38 AssertType(module.exports.funky, "(any) => boolean");
|
/arkcompiler/ets_frontend/arkguard/test/grammar/export/ |
D | exports_demo_1.js | 18 exports.myExportVar = exportVar; 19 exports.myVariable = 1; 20 exports.myFunction = function() { 29 exports.MyClass3 = MyClass3; 31 exports.noNameClass = class {
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/jsDeclarationsClassExtendsVisibility/ |
D | cls.js | 41 module.exports = Foo; 42 AssertType(module.exports = Foo, "typeof Foo"); 43 AssertType(module.exports, "typeof Foo"); 46 module.exports.Strings = Strings; 47 AssertType(module.exports.Strings = Strings, "{ a: string; b: string; }"); 48 AssertType(module.exports.Strings, "{ a: string; b: string; }");
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/collisionExportsRequireAndAmbientVar/ |
D | collisionExportsRequireAndAmbientVar_globalFile.ts | 21 declare let exports: number; 22 AssertType(exports, "number"); 28 let exports: string; 32 export declare let exports: string; variable
|
D | collisionExportsRequireAndAmbientVar_externalmodule.ts | 21 export declare let exports: number; 22 AssertType(exports, "number"); 28 let exports: string; 32 export declare let exports: number; variable
|