mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Introduce package for sharing eslint and prettier configurations Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Start using eslint and prettier in packages Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> --------- Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
27 lines
665 B
TypeScript
27 lines
665 B
TypeScript
import { getInjectable, getInjectionToken } from "@ogre-tools/injectable";
|
|
import type { Feature } from "./feature";
|
|
|
|
export type FeatureContextMap = Map<
|
|
Feature,
|
|
{
|
|
register: () => void;
|
|
deregister: () => void;
|
|
dependedBy: Map<Feature, number>;
|
|
numberOfRegistrations: number;
|
|
}
|
|
>;
|
|
|
|
export const featureContextMapInjectionToken = getInjectionToken<FeatureContextMap>({
|
|
id: "feature-context-map-injection-token",
|
|
});
|
|
|
|
const featureContextMapInjectable = getInjectable({
|
|
id: "feature-store",
|
|
|
|
instantiate: (): FeatureContextMap => new Map(),
|
|
|
|
injectionToken: featureContextMapInjectionToken,
|
|
});
|
|
|
|
export { featureContextMapInjectable };
|