feat:fix dirty props cannot be rendered in promise

This commit is contained in:
pengfei.zhou
2021-03-04 14:35:34 +08:00
committed by osborn
parent aa56fd93d9
commit 936bd60293
10 changed files with 123 additions and 2 deletions

View File

@@ -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;

View File

@@ -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);