@tur-ng/std 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +22 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -929,6 +929,28 @@ declare module "tur:std" {
|
|
|
929
929
|
pool?: WorkerPoolHandle;
|
|
930
930
|
/** Survive element unbind (default `false`). */
|
|
931
931
|
keepAlive?: boolean;
|
|
932
|
+
/**
|
|
933
|
+
* Notified of runtime JS errors inside the child after it reached
|
|
934
|
+
* `"running"`: throws from mutations / view closures / factories /
|
|
935
|
+
* microtask + async callbacks, and promise rejections that still
|
|
936
|
+
* have no handler at the end of a frame (a same-frame `.catch`
|
|
937
|
+
* retracts). The callback receives a reconstructed `Error` minted in
|
|
938
|
+
* the parent realm (`e instanceof Error`, `e.message`, best-effort
|
|
939
|
+
* `e.stack`) — the child's thrown value never crosses the worker
|
|
940
|
+
* boundary.
|
|
941
|
+
*
|
|
942
|
+
* Notification only: does NOT fire for module load/start failures
|
|
943
|
+
* (those ride `status$` / `errorMsg$` / `errorView`) and does not
|
|
944
|
+
* change `status$`. Coalesced: at most one dispatch per frame.
|
|
945
|
+
*
|
|
946
|
+
* ```js
|
|
947
|
+
* const app = createVirtualAppController({
|
|
948
|
+
* source,
|
|
949
|
+
* onRuntimeError$: mutate((ctx, e) => log(e.message, e.stack)),
|
|
950
|
+
* });
|
|
951
|
+
* ```
|
|
952
|
+
*/
|
|
953
|
+
onRuntimeError$?: Mutation<[unknown]>;
|
|
932
954
|
}): VirtualAppController;
|
|
933
955
|
|
|
934
956
|
/** Element hosting a virtual app; draws the child's latest frame. */
|