feat:fix dirty props cannot be rendered in promise
This commit is contained in:
1
doric-js/lib/src/runtime/sandbox.d.ts
vendored
1
doric-js/lib/src/runtime/sandbox.d.ts
vendored
@@ -17,6 +17,7 @@ export declare class Context {
|
||||
function2Id(func: Function): string;
|
||||
removeFuncById(funcId: string): void;
|
||||
}
|
||||
export declare function allContexts(): IterableIterator<Context>;
|
||||
export declare function jsObtainContext(id: string): Context | undefined;
|
||||
export declare function jsReleaseContext(id: string): void;
|
||||
export declare function __require__(name: string): any;
|
||||
|
@@ -143,6 +143,9 @@ export class Context {
|
||||
}
|
||||
const gContexts = new Map;
|
||||
const gModules = new Map;
|
||||
export function allContexts() {
|
||||
return gContexts.values();
|
||||
}
|
||||
export function jsObtainContext(id) {
|
||||
if (gContexts.has(id)) {
|
||||
const context = gContexts.get(id);
|
||||
|
Reference in New Issue
Block a user