This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/src/DoricContext.ts

16 lines
427 B
TypeScript
Raw Normal View History

2019-12-19 11:52:15 +08:00
import { DoricPlugin } from "./DoricPlugin"
const doricContexts: Map<string, DoricContext> = new Map
export function getDoricContext(contextId: string) {
return doricContexts.get(contextId)
}
export class DoricContext {
contextId: string
pluginInstances: Map<string, DoricPlugin> = new Map
constructor(contextId: string) {
this.contextId = contextId
doricContexts.set(contextId, this)
}
}