mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
- Bundled extensions are always enabled, and are always compatible - Have bundled extensions be loaded asyncronously to support typescript dynamic import (which is typed) as opposed to require Signed-off-by: Sebastian Malton <sebastian@malton.name>
17 lines
515 B
TypeScript
17 lines
515 B
TypeScript
import { getInjectionToken } from "@ogre-tools/injectable";
|
|
import type {
|
|
BundledLensExtensionConstructor,
|
|
BundledLensExtensionManifest,
|
|
} from "./lens-extension";
|
|
|
|
export interface BundledExtension {
|
|
readonly manifest: BundledLensExtensionManifest;
|
|
main: () => Promise<BundledLensExtensionConstructor | null>;
|
|
renderer: () => Promise<BundledLensExtensionConstructor | null>;
|
|
}
|
|
|
|
export const bundledExtensionInjectionToken =
|
|
getInjectionToken<BundledExtension>({
|
|
id: "bundled-extension-path",
|
|
});
|