Home
last modified time | relevance | path

Searched full:module (Results 1 – 25 of 1072) sorted by relevance

12345678910>>...43

/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DjsDeclarationsExportDefinePropertyEmit.ts21 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 …]
DjsDeclarationsFunctionsCjs.ts21 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 …]
DcommentsModules.ts21 /** Module comment*/
22 module m1 {
31 export module m2 {
60 } // trailing comment module
70 /** module comment of m2.m3*/
71 module m2.m3 {
75 } /* trailing dotted module comment*/
80 /** module comment of m3.m4.m5*/
81 module m3.m4.m5 {
85 } // trailing dotted module 2
[all …]
DcollisionCodeGenModuleWithModuleChildren.ts22 module M {
24 module m1 {
30 module M {
31 module m2 {
39 module M {
40 module m3 {
48 module M { // shouldnt be _M
49 module m3 {
57 module M {
58 module m4 {
[all …]
Dmoduledecl.ts21 module a {
24 module b.a {
27 module c.a.b {
31 module mImport {
38 module m0 {
67 module m1 {
105 module m {
106 export module m2 {
111 export module m3 {
116 module m {
[all …]
DmergeThreeInterfaces2.ts22 // two interfaces with the same root module should merge
24 // root module now multiple module declarations
25 module M2 {
35 module M2 {
50 // same as above but with an additional level of nesting and third module declaration
51 module M2 {
52 export module M3 {
63 module M2 {
64 export module M3 {
77 module M2 {
[all …]
DprivacyGloImport.ts21 module m1 {
22 export module m1_M1_public {
34 module m1_M2_private {
71 module glo_M1_public {
83 declare module "glo_M2_public" {
91 declare module "use_glo_M1_public" {
108 module m2 {
111 module m5 {
117 declare module "anotherParseError" {
118 module m2 {
[all …]
DmixingFunctionAndAmbientModule1.ts22 module A {
23 declare module My {
29 module B {
30 declare module My {
37 module C {
38 declare module My {
44 module D {
45 declare module My {
53 module E {
54 declare module My {
[all …]
DenumMerging.ts22 // Enum with only constant members across 2 declarations with the same root module
23 // Enum with initializer in all declarations with constant members with the same root module
24 module M1 {
44 // Enum with only computed members across 2 declarations with the same root module
45 module M2 {
57 …um with initializer in only one of two declarations with constant members with the same root module
58 module M3 {
69 // Enums with same name but different root module
70 module M4 {
73 module M5 {
[all …]
DaugmentedTypesModules4.ts22 // module then enum
24 module m4 { }
27 module m4a { let y = 2; }
30 module m4b { export let y = 2; }
33 module m4c { interface I { foo(): void } }
36 module m4d { class C { foo() { } } }
39 //// module then module
41 module m5 { export let y = 2; }
42 module m5 { export interface I { foo(): void } } // should already be reasonably well covered
DjsDeclarationsExportAssignedClassExpressionAnonymousWithSub.ts21 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 …]
DnameCollision.ts22 module A {
29 module B {
33 module B {
34 // re-opened module with colliding name
41 module X {
43 export module Y {
45 export module Z {
53 module Y.Y {
61 module D {
DmergeTwoInterfaces2.ts22 // two interfaces with the same root module should merge
24 // root module now multiple module declarations
25 module M2 {
35 module M2 {
46 module M2 {
47 export module M3 {
58 module M2 {
59 export module M3 {
DtypeGuardsInModule.ts34 // Inside module
35 module m1 {
39 // letiables in module declaration
54 // exported letiable in the module
69 // local module
70 module m2 {
73 module m3 {
77 // local letiables from outer module declaration
80 // exported letiable from outer the module
83 // letiables in module declaration
[all …]
/arkcompiler/ets_runtime/ecmascript/module/
Djs_module_deregister.cpp15 #include "ecmascript/module/js_module_deregister.h"
23 #include "ecmascript/module/js_module_manager.h"
24 #include "ecmascript/module/js_module_source_text.h"
25 #include "ecmascript/module/module_data_extractor.h"
36 LOG_FULL(FATAL) << "Lacking deregister module's name."; in FreeModuleRecord()
41 // pointer is module's name, which will be deregistered. in FreeModuleRecord()
42 JSHandle<SourceTextModule> module = in FreeModuleRecord() local
45 LoadingTypes type = module->GetLoadingTypes(); in FreeModuleRecord()
46 JSTaggedValue moduleRecordName = SourceTextModule::GetModuleName(module.GetTaggedValue()); in FreeModuleRecord()
49 LOG_FULL(DEBUG) << "free stable module's ModuleNameSpace" << recordNameStr; in FreeModuleRecord()
[all …]
Djs_module_source_text.cpp16 #include "ecmascript/module/js_module_source_text.h"
24 #include "ecmascript/module/js_module_deregister.h"
25 #include "ecmascript/module/js_module_manager.h"
26 #include "ecmascript/module/js_module_namespace.h"
27 #include "ecmascript/module/module_data_extractor.h"
28 #include "ecmascript/module/module_path_helper.h"
36 …ing> SourceTextModule::GetExportedNames(JSThread *thread, const JSHandle<SourceTextModule> &module, in GetExportedNames() argument
40 // 1. Let module be this Source Text Module Record. in GetExportedNames()
41 // 2. If exportStarSet contains module, then in GetExportedNames()
42 if (exportStarSet->GetIdx(module.GetTaggedValue()) != TaggedArray::MAX_ARRAY_INDEX) { in GetExportedNames()
[all …]
Djs_module_record.cpp16 #include "ecmascript/module/js_module_record.h"
17 #include "ecmascript/module/js_module_source_text.h"
20 int32_t ModuleRecord::Instantiate(JSThread *thread, const JSHandle<JSTaggedValue> &module) in Instantiate() argument
22 if (module->IsSourceTextModule()) { in Instantiate()
23 return SourceTextModule::Instantiate(thread, module); in Instantiate()
29 int32_t ModuleRecord::Evaluate(JSThread *thread, const JSHandle<JSTaggedValue> &module) in Evaluate() argument
31 if (module->IsSourceTextModule()) { in Evaluate()
32 JSHandle<SourceTextModule> moduleRecord = JSHandle<SourceTextModule>::Cast(module); in Evaluate()
39 JSTaggedValue ModuleRecord::GetNamespace(JSTaggedValue module) in GetNamespace() argument
41 if (module.IsSourceTextModule()) { in GetNamespace()
[all …]
Djs_module_source_text.h21 #include "ecmascript/module/js_module_record.h"
22 #include "ecmascript/module/js_module_entry.h"
56 … const JSHandle<SourceTextModule> &module,
59 … const JSHandle<SourceTextModule> &module,
63 …c CVector<std::string> GetExportedNames(JSThread *thread, const JSHandle<SourceTextModule> &module,
67 …c JSHandle<JSTaggedValue> ResolveExport(JSThread *thread, const JSHandle<SourceTextModule> &module,
70 …ndle<JSTaggedValue> ResolveExportObject(JSThread *thread, const JSHandle<SourceTextModule> &module,
73 // 15.2.1.16.4.1 InnerModuleInstantiation ( module, stack, index )
78 // 15.2.1.16.4.2 ModuleDeclarationEnvironmentSetup ( module )
79 …void ModuleDeclarationEnvironmentSetup(JSThread *thread, const JSHandle<SourceTextModule> &module);
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/moduleExportDuplicateAlias2/
DmoduleExportAliasDuplicateAlias.js21 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/moduleExportsElementAccessAssignment/
Dmod1.js46 module.exports["c"] = { x: "x" };
47 AssertType(module.exports["c"] = { x: "x" }, "{ x: string; }");
48 AssertType(module.exports["c"], "{ x: string; }");
49 AssertType(module.exports, "typeof module.exports");
55 module["exports"]["d"] = {};
56 AssertType(module["exports"]["d"] = {}, "typeof "d"");
57 AssertType(module["exports"]["d"], "typeof "d"");
58 AssertType(module["exports"], "typeof module.exports");
59 AssertType(module, "{ exports: typeof module.exports; }");
64 module["exports"]["d"].e = 0;
[all …]
/arkcompiler/ets_frontend/es2panda/test/parser/ts/
Dtest-keyword-identify5.ts17 var declare = 0, module = 1, ns = 2; variable
18 module = 2;
19 module++;
21 module
26 module
30 module M {}
32 declare module "module" {}
Dtest_module.ts32 module a.b.c {
39 module a.b.c {
53 declare module "foo";
57 module module1 {
63 export module module2 {
69 declare module module3 {
73 export declare module module4 {
77 declare module "foo" {
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/collisionExportsRequireAndAmbientModule/
DcollisionExportsRequireAndAmbientModule_globalFile.ts22 declare module require {
28 declare module exports {
34 declare module m3 {
35 module require {
41 module exports {
48 module m4 {
49 export declare module require {
55 export declare module exports {
DcollisionExportsRequireAndAmbientModule_externalmodule.ts21 export declare module require {
31 export declare module exports {
41 declare module m1 {
42 module require {
48 module exports {
55 module m2 {
56 export declare module require {
62 export declare module exports {
/arkcompiler/ets_runtime/ecmascript/require/
Djs_require_manager.cpp30 JSHandle<CjsModule> module = cjsInfo.moduleHdl; in InitializeCommonJS() local
36 // Set module.exports ---> exports in InitializeCommonJS()
38 SlowRuntimeStub::StObjByName(thread, module.GetTaggedValue(), exportsKey.GetTaggedValue(), in InitializeCommonJS()
40 // initialize module in InitializeCommonJS()
41 CjsModule::InitializeModule(thread, module, filename, dirname); in InitializeCommonJS()
43 // Set this.module ---> this.require.parent in InitializeCommonJS()
46 module.GetTaggedValue()); in InitializeCommonJS()
47 // cache ----> Set Module._cache in InitializeCommonJS()
55 JSHandle<JSTaggedValue>::Cast(filename), JSHandle<JSTaggedValue>(module)); in InitializeCommonJS()
64 JSHandle<CjsModule> module = cjsInfo.moduleHdl; in CollectExecutedExp() local
[all …]

12345678910>>...43