Skip to content

Commit

Permalink
fix: add WorkspaceUpdatedEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Jul 26, 2024
1 parent e3f9835 commit f41c73e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/types/events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export * from './window-managed-event';
export * from './window-unmanaged-event';
export * from './workspace-activated-event';
export * from './workspace-deactivated-event';
export * from './workspace-moved-event';
export * from './workspace-updated-event';
8 changes: 0 additions & 8 deletions src/types/events/workspace-moved-event.ts

This file was deleted.

7 changes: 7 additions & 0 deletions src/types/events/workspace-updated-event.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { Workspace } from '../containers';
import { WmEventType } from '../wm-events';

export interface WorkspaceUpdatedEvent {
type: WmEventType.WORKSPACE_UPDATED;
updatedWorkspace: Workspace;
}
8 changes: 4 additions & 4 deletions src/types/wm-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
WindowUnmanagedEvent,
WorkspaceActivatedEvent,
WorkspaceDeactivatedEvent,
WorkspaceMovedEvent,
WorkspaceUpdatedEvent,
} from './events';

/**
Expand All @@ -33,7 +33,7 @@ export enum WmEventType {
WINDOW_UNMANAGED = 'window_unmanaged',
WORKSPACE_ACTIVATED = 'workspace_activated',
WORKSPACE_DEACTIVATED = 'workspace_deactivated',
WORKSPACE_MOVED = 'workspace_moved',
WORKSPACE_UPDATED = 'workspace_updated',
}

/**
Expand All @@ -53,7 +53,7 @@ export type WmEvent =
| WindowUnmanagedEvent
| WorkspaceActivatedEvent
| WorkspaceDeactivatedEvent
| WorkspaceMovedEvent;
| WorkspaceUpdatedEvent;

/**
* Utility type for getting event interface for given {@link WmEventType}.
Expand All @@ -78,5 +78,5 @@ export type WmEventData<T extends WmEventType = WmEventType.ALL> = {
[WmEventType.USER_CONFIG_CHANGED]: UserConfigChangedEvent;
[WmEventType.WORKSPACE_ACTIVATED]: WorkspaceActivatedEvent;
[WmEventType.WORKSPACE_DEACTIVATED]: WorkspaceDeactivatedEvent;
[WmEventType.WORKSPACE_MOVED]: WorkspaceMovedEvent;
[WmEventType.WORKSPACE_UPDATED]: WorkspaceUpdatedEvent;
}[T];

0 comments on commit f41c73e

Please sign in to comment.