Skip to content

Commit

Permalink
chore: add ts prettify (#5202)
Browse files Browse the repository at this point in the history
- adds a TypeScript Prettify tool that allows for more helpful type annotations
  • Loading branch information
petermakowski authored Oct 26, 2023
1 parent 1938f2e commit 7554a90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/app/base/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import type { Machine } from "app/store/machine/types";

export type TSFixMe = any; // eslint-disable-line @typescript-eslint/no-explicit-any

export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};

export type Seconds = number;
export type Minutes = number;
export type Days = number;
Expand Down
6 changes: 4 additions & 2 deletions src/app/store/machine/types/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from "./base";
import type { MachineMeta } from "./enum";

import type { Prettify } from "app/base/types";
import type { Domain } from "app/store/domain/types";
import type { Fabric } from "app/store/fabric/types";
import type { LicenseKeys } from "app/store/licensekeys/types";
Expand Down Expand Up @@ -52,13 +53,14 @@ export type ApplyStorageLayoutParams = {
storageLayout: StorageLayout;
};

export type BaseMachineActionParams =
export type BaseMachineActionParams = Prettify<
| BaseNodeActionParams
| {
system_id?: never;
filter: FetchFilters;
callId?: string;
};
}
>;

export type CloneParams = BaseMachineActionParams & {
system_id: Node["system_id"];
Expand Down

0 comments on commit 7554a90

Please sign in to comment.