mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 09:15:34 +03:00
@@ -1,8 +1,8 @@
|
||||
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)
|
||||
};
|
||||
return {
|
||||
get: () => getContext<T>(key),
|
||||
set: (context: T) => setContext<T>(key, context),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user