/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | asyncFunctionContextuallyTypedReturns.ts | 22 f(v => v ? [0] : Promise.reject()); 23 AssertType(f(v => v ? [0] : Promise.reject()), "void"); 25 AssertType(v => v ? [0] : Promise.reject(), "(boolean) => union"); 27 AssertType(v ? [0] : Promise.reject(), "union"); 31 AssertType(Promise.reject(), "Promise<[0]>"); 32 AssertType(Promise.reject, "<T = never>(?any) => Promise<T>"); 34 f(async v => v ? [0] : Promise.reject()); 35 AssertType(f(async v => v ? [0] : Promise.reject()), "void"); 37 AssertType(async v => v ? [0] : Promise.reject(), "(boolean) => Promise<[0]>"); 39 AssertType(v ? [0] : Promise.reject(), "union"); [all …]
|
D | jsDeclarationsTypedefFunction.ts | 36 const send = handlers => new Promise((resolve, reject) => { 38 AssertType(handlers => new Promise((resolve, reject) => { handlers[++id] = [resolve, reject]}), "(… 40 AssertType(new Promise((resolve, reject) => { handlers[++id] = [resolve, reject]}), "Promise<any>"… 42 AssertType((resolve, reject) => { handlers[++id] = [resolve, reject]}, "((any) => void, (?any) => … 44 AssertType(reject, "(?any) => void"); 46 handlers[++id] = [resolve, reject] 47 AssertType(handlers[++id] = [resolve, reject], "[(any) => void, (?any) => void]"); 52 AssertType([resolve, reject], "[(any) => void, (?any) => void]"); 54 AssertType(reject, "(?any) => void");
|
D | typeLiteralCallback.ts | 22 reject(arg: T): void ; 34 test.fail(arg => foo.reject(arg)); 35 AssertType(test.fail(arg => foo.reject(arg)), "void"); 37 AssertType(arg => foo.reject(arg), "(string) => void"); 39 AssertType(foo.reject(arg), "void"); 40 AssertType(foo.reject, "(string) => void"); 43 test.fail2(arg => foo.reject(arg)); // Should be OK. Was: Error: Supplied parameters do not match… 44 AssertType(test.fail2(arg => foo.reject(arg)), "void"); 46 AssertType(arg => foo.reject(arg), "(string) => void"); 48 AssertType(foo.reject(arg), "void"); [all …]
|
D | genericInterfaceTypeCall.ts | 22 reject(arg: T): void; 34 test.fail(arg => foo.reject(arg)); 35 AssertType(test.fail(arg => foo.reject(arg)), "void"); 37 AssertType(arg => foo.reject(arg), "(string) => void"); 39 AssertType(foo.reject(arg), "void"); 40 AssertType(foo.reject, "(string) => void"); 43 test.fail2(arg => foo.reject(arg)); // Error: Supplied parameters do not match any signature of cal… 44 AssertType(test.fail2(arg => foo.reject(arg)), "void"); 46 AssertType(arg => foo.reject(arg), "(string) => void"); 48 AssertType(foo.reject(arg), "void"); [all …]
|
D | promiseTypeStrictNull.ts | 112 AssertType(Promise.reject(Error()), "Promise<never>"); 113 AssertType(Promise.reject, "<T = never>(?any) => Promise<T>"); 116 return Promise.reject(Error()); 169 AssertType(Promise.reject(Error()), "Promise<never>"); 170 AssertType(Promise.reject, "<T = never>(?any) => Promise<T>"); 173 return Promise.reject(Error()); 242 const p18 = p.catch(() => Promise.reject(1)); 244 AssertType(p.catch(() => Promise.reject(1)), "Promise<boolean>"); 246 AssertType(() => Promise.reject(1), "() => Promise<never>"); 247 AssertType(Promise.reject(1), "Promise<never>"); [all …]
|
D | usePromiseFinally.ts | 21 let promise1 = new Promise(function(resolve, reject) {}) 23 AssertType(new Promise(function(resolve, reject) {}) .finally(function() {}), "Promi… 24 AssertType(new Promise(function(resolve, reject) {}) .finally, "(?() => void) => Pro…
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/inferenceLimit/ |
D | file1.ts | 31 …resolve, reject) => { let result: Array<MyModule.MyModel> = []; let populateItems = (order) … 34 …resolve, reject) => { let result: Array<MyModule.MyModel> = []; let populateItems = (order) … 36 AssertType(reject, "(?any) => void"); 37 return new Promise<Array<MyModule.MyModel>>((resolve, reject) => { 47 AssertType((order) => { return new Promise((resolve, reject) => { this.doStuff(order.id… 49 AssertType(new Promise((resolve, reject) => { this.doStuff(order.id) .then((items) … 51 AssertType((resolve, reject) => { this.doStuff(order.id) .then((items) => { … 53 AssertType(reject, "(?any) => void"); 54 return new Promise((resolve, reject) => {
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/defaultExportInAwaitExpression01/ |
D | a.ts | 21 const x = new Promise( ( resolve, reject ) => { resolve( {} ); } ); 23 AssertType(new Promise( ( resolve, reject ) => { resolve( {} ); } ), "Promise<unknown>"); 25 AssertType(( resolve, reject ) => { resolve( {} ); }, "((unknown) => void, (?any) => void) => void"… 27 AssertType(reject, "(?any) => void");
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/defaultExportInAwaitExpression02/ |
D | a.ts | 21 const x = new Promise( ( resolve, reject ) => { resolve( {} ); } ); 23 AssertType(new Promise( ( resolve, reject ) => { resolve( {} ); } ), "Promise<unknown>"); 25 AssertType(( resolve, reject ) => { resolve( {} ); }, "((unknown) => void, (?any) => void) => void"… 27 AssertType(reject, "(?any) => void");
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_promise_job.cpp | 121 JSHandle<JSTaggedValue> reject(thread, resolvingFunctions->GetRejectFunction()); in PromiseResolveThenableJob() local 123 EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefined, undefined, 1); in PromiseResolveThenableJob() 142 JSHandle<JSPromiseReactionsFunction> reject(GetCallArg(argv, 1)); // 1 : reject method in DynamicImportJob() local 149 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, CatchException(thread, reject)); in DynamicImportJob() 162 … return DynamicImport::ExecuteNativeModule(thread, specifierString, moduleType, resolve, reject); in DynamicImportJob() 168 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, CatchException(thread, reject)); in DynamicImportJob() 180 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, CatchException(thread, reject)); in DynamicImportJob() 188 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, CatchException(thread, reject)); in DynamicImportJob() 196 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, CatchException(thread, reject)); in DynamicImportJob() 203 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, CatchException(thread, reject)); in DynamicImportJob() [all …]
|
D | builtins_async_from_sync_iterator.cpp | 96 JSHandle<JSTaggedValue> reject(thread, pcap->GetReject()); in Throw() local 98 EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefinedValue, undefinedValue, 1); in Throw() 123 JSHandle<JSTaggedValue> reject(thread, pcap->GetReject()); in Throw() local 125 EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefinedValue, undefinedValue, 1); in Throw() 199 JSHandle<JSTaggedValue> reject(thread, pcap->GetReject()); in Return() local 201 EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefinedValue, undefinedValue, 1); in Return()
|
D | builtins_promise_job.h | 27 …static JSTaggedValue CatchException(JSThread *thread, JSHandle<JSPromiseReactionsFunction> reject);
|
D | builtins_promise_handler.cpp | 113 …JSHandle<JSPromiseReactionsFunction> reject = JSHandle<JSPromiseReactionsFunction>::Cast(GetConstr… in Reject() local 114 ASSERT_PRINT(reject->GetPromise().IsECMAObject(), "Reject: promise must be js object"); in Reject() 120 JSHandle<JSPromise> rejectPromise(thread, reject->GetPromise()); in Reject() 121 JSHandle<PromiseRecord> alreadyResolved(thread, reject->GetAlreadyResolved()); in Reject() 159 JSHandle<JSTaggedValue> reject = GetCallArg(argv, 1); in Executor() local 161 promiseCapability->SetReject(thread, reject); in Executor()
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_promise_test.cpp | 69 JSHandle<JSTaggedValue> reject(thread, reactions->GetRejectFunction()); in HWTEST_F_L0() local 71 EXPECT_EQ(reject->IsCallable(), true); in HWTEST_F_L0() 85 JSHandle<JSPromiseReactionsFunction> reject(thread, capbility->GetReject()); in HWTEST_F_L0() local 90 JSHandle<JSPromise> rejectedPromise(thread, reject->GetPromise()); in HWTEST_F_L0() 124 JSHandle<JSTaggedValue> reject(thread, capbility->GetReject()); in HWTEST_F_L0() local 126 …EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefined, undefin… in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/test/moduletest/promise/ |
D | promise.js | 22 var p = new Promise((resolve, reject) => { 25 var p1 = Promise.reject(1357);
|
D | expect_output.txt | 14 reject
|
/arkcompiler/ets_runtime/ecmascript/module/ |
D | js_dynamic_import.cpp | 28 …uleType, JSHandle<JSPromiseReactionsFunction> resolve, JSHandle<JSPromiseReactionsFunction> reject) in ExecuteNativeModule() argument 58 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, BuiltinsPromiseJob::CatchException(thread, reject)); in ExecuteNativeModule() 64 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, BuiltinsPromiseJob::CatchException(thread, reject)); in ExecuteNativeModule()
|
D | js_dynamic_import.h | 28 JSHandle<JSPromiseReactionsFunction> reject);
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_promise.cpp | 49 JSHandle<JSPromiseReactionsFunction> reject = factory->CreateJSPromiseReactionsFunction( in CreateResolvingFunctions() local 52 reject->SetPromise(thread, promise); in CreateResolvingFunctions() 54 reject->SetAlreadyResolved(thread, record); in CreateResolvingFunctions() 58 reactions->SetRejectFunction(thread, reject.GetTaggedValue()); in CreateResolvingFunctions()
|
D | js_async_generator_object.cpp | 108 JSHandle<JSTaggedValue> reject(thread, capability->GetReject()); in AsyncGeneratorReject() local 113 EcmaInterpreter::NewRuntimeCallInfo(thread, reject, thisArg, undefined, 1); in AsyncGeneratorReject() 267 JSHandle<JSTaggedValue> reject(thread, pcap->GetReject()); in AsyncGeneratorEnqueue() local 271 EcmaInterpreter::NewRuntimeCallInfo(thread, reject, thisArg, undefined, 1); in AsyncGeneratorEnqueue()
|
/arkcompiler/runtime_core/isa/ |
D | combine.rb | 47 …raise 'Plugged in instructions must be prefixed' unless instructions.reject { |i| i['prefix'] }.em…
|
D | asserts.rb | 36 Panda.instructions.reject(&:prefix).size + Panda.prefixes.size <= 256 40 Panda.instructions.reject(&:prefix).sorted_by?(&:opcode_idx)
|
D | isapi.rb | 404 handlers = Panda.instructions.reject(&:prefix) + 408 Panda.prefixes.reject(&:public?) + 415 …(Panda.instructions.reject(&:prefix).map(&:opcode_idx).max + 1)..(Panda.prefixes.map(&:opcode_idx)… 419 max_invalid_idx = Panda.prefixes.reject(&:public?).map(&:opcode_idx).min || 256
|
/arkcompiler/ets_frontend/es2panda/test/parser/ts/ |
D | test_generic.ts | 27 …rLike = new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) =>…
|
/arkcompiler/runtime_core/tests/cts-generator/runner/reporters/ |
D | jtr_reporter.rb | 62 lines = @output.split("\n").map(&:strip).reject { |l| l.match(/^$/) }
|