Skip to content

Commit

Permalink
ui: make these UIConfigState properties optional
Browse files Browse the repository at this point in the history
This change fixes Typescript errors encountered trying to work in our
cloud code.

Codebases that load multiple versions of our cluster-ui package (read:
managed-service) need a lowest-common-denominator expression for their
default UIConfigState.

Properties like these `showTerminateActions` flags that exist only for
versions >= 21.2 must therefore be marked as optional.

Release note: None
  • Loading branch information
matthewtodd committed Jan 19, 2022
1 parent d73a015 commit f08e9b3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export type UIConfigState = {
statementDetails: {
showStatementDiagnosticsLink: boolean;
};
sessions: {
showTerminateActions: boolean;
sessions?: {
showTerminateActions?: boolean;
};
sessionDetails: {
showGatewayNodeLink: boolean;
showTerminateActions: boolean;
showTerminateActions?: boolean;
};
};
};
Expand Down

0 comments on commit f08e9b3

Please sign in to comment.