Files
immich/web/src/lib/utils/context.ts
Michel Heusschen b29c43d86a feat(web): bundle and 'sveltify' leaflet (#1998)
* feat(web): bundle and 'sveltify' leaflet

* lazy load leaflet components

* add correct icon sizes
2023-03-19 14:06:45 -05:00

9 lines
218 B
TypeScript

import { getContext, setContext } from 'svelte';
export function createContext<T>(key: string | symbol = Symbol()) {
return {
get: () => getContext<T>(key),
set: (context: T) => setContext<T>(key, context)
};
}