export function createContextMap( /** * Context from other parent Svelte components. Retrieved by `getAllContexts()` from `svelte` */ allContext: Map, /** * Context required by prosemirror-adapter */ adapterContext: object, ): Map { return new Map([ ...allContext, // Put it last so that it can override if there are key conflicts. ...Object.entries(adapterContext), ]) }