You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
1.2 KiB

'use strict';
/**
* @license Angular
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
// packages/zone.js/lib/zone-spec/sync-test.js
function patchSyncTest(Zone2) {
class SyncTestZoneSpec {
constructor(namePrefix) {
__publicField(this, "runZone", Zone2.current);
// ZoneSpec implementation below.
__publicField(this, "name");
this.name = "syncTestZone for " + namePrefix;
}
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case "microTask":
case "macroTask":
throw new Error(`Cannot call ${task.source} from within a sync test (${this.name}).`);
case "eventTask":
task = delegate.scheduleTask(target, task);
break;
}
return task;
}
}
Zone2["SyncTestZoneSpec"] = SyncTestZoneSpec;
}
// packages/zone.js/lib/zone-spec/rollup-sync-test.js
patchSyncTest(Zone);