mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix building docs and verify:docs workflow (#7013)
* Fix building docs and verify:docs workflow Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix commands Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
2afc62c296
commit
20c0fd912f
20 files changed
+87
-79
No files matched your search
@@ -51,10 +51,16 @@ export abstract class BaseStore<T extends object> {
|
||||
|
||||
readonly displayName = kebabCase(this.params.configName).toUpperCase();
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
protected readonly dependencies: BaseStoreDependencies;
|
||||
|
||||
protected constructor(
|
||||
protected readonly dependencies: BaseStoreDependencies,
|
||||
dependencies: BaseStoreDependencies,
|
||||
protected readonly params: BaseStoreParams<T>,
|
||||
) {
|
||||
this.dependencies = dependencies;
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } fr
|
||||
import type { CatalogEntityActionContext } from "../catalog/catalog-entity";
|
||||
import { CatalogCategory, CatalogEntity, categoryVersion } from "../catalog/catalog-entity";
|
||||
|
||||
interface GeneralEntitySpec extends CatalogEntitySpec {
|
||||
export interface GeneralEntitySpec extends CatalogEntitySpec {
|
||||
path: string;
|
||||
icon?: {
|
||||
material?: string;
|
||||
|
||||
@@ -9,7 +9,9 @@ import { observable, makeObservable } from "mobx";
|
||||
import { once } from "lodash";
|
||||
import type { Disposer } from "../utils";
|
||||
import { iter } from "../utils";
|
||||
import type { CategoryColumnRegistration } from "../../renderer/components/+catalog/custom-category-columns";
|
||||
import type { CategoryColumnRegistration, TitleCellProps } from "../../renderer/components/+catalog/custom-category-columns";
|
||||
|
||||
export type { CategoryColumnRegistration, TitleCellProps };
|
||||
|
||||
export type CatalogEntityDataFor<Entity> = Entity extends CatalogEntity<infer Metadata, infer Status, infer Spec>
|
||||
? CatalogEntityData<Metadata, Status, Spec>
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
|
||||
// Custom event emitter
|
||||
|
||||
interface Options {
|
||||
export interface EventEmitterOptions {
|
||||
once?: boolean; // call once and remove
|
||||
prepend?: boolean; // put listener to the beginning
|
||||
}
|
||||
|
||||
type Callback<D extends [...any[]]> = (...data: D) => void | boolean;
|
||||
export type EventEmitterCallback<D extends any[]> = (...data: D) => void | boolean;
|
||||
|
||||
export class EventEmitter<D extends [...any[]]> {
|
||||
protected listeners: [Callback<D>, Options][] = [];
|
||||
export class EventEmitter<D extends any[]> {
|
||||
protected listeners: [EventEmitterCallback<D>, EventEmitterOptions][] = [];
|
||||
|
||||
addListener(callback: Callback<D>, options: Options = {}) {
|
||||
addListener(callback: EventEmitterCallback<D>, options: EventEmitterOptions = {}) {
|
||||
const fn = options.prepend ? "unshift" : "push";
|
||||
|
||||
this.listeners[fn]([callback, options]);
|
||||
}
|
||||
|
||||
removeListener(callback: Callback<D>) {
|
||||
removeListener(callback: EventEmitterCallback<D>) {
|
||||
this.listeners = this.listeners.filter(([cb]) => cb !== callback);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user