/** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectionToken } from "@ogre-tools/injectable"; import type { IComputedValue } from "mobx"; type AsJson = T extends string | number | boolean | null ? T : T extends Function ? never : T extends Array ? AsJson[] : T extends object ? { [K in keyof T]: AsJson } : never; export interface SyncBox { id: string; value: IComputedValue>; set: (value: AsJson) => void; } export const syncBoxInjectionToken = getInjectionToken>({ id: "sync-box", });