Skip to content

Commit

Permalink
fix: grouped properties had "any" type.
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Jan 26, 2024
1 parent f9c5435 commit 227c897
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions packages/comms/src/ecl/workunit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ const extendedProps = ["Avg", "Min", "Max", "Delta", "StdDev"];
const relatedProps = ["SkewMin", "SkewMax", "NodeMin", "NodeMax"];
interface PropertyValue {
Key: string;
Value: string;
Value?: string;
// Extended properties ---
Avg: string;
Min: string;
Max: string;
Delta: string;
StdDev: string;
Avg?: string;
Min?: string;
Max?: string;
Delta?: string;
StdDev?: string;
// Related properties ---
SkewMin: string;
SkewMax: string;
NodeMin: string;
NodeMax: string;
SkewMin?: string;
SkewMax?: string;
NodeMin?: string;
NodeMax?: string;
}

export interface IScope {
__parentName?: string;
__children?: IScope[];
__formattedProps: { [key: string]: any };
__groupedProps: { [key: string]: any };
__groupedProps: { [key: string]: PropertyValue };
id: string;
name: string;
type: string;
Expand Down Expand Up @@ -105,8 +105,8 @@ function splitLabel(key: string): SplitKey {
return retVal;
}

function formatValue(item: IScope, key: string): string {
return item.__formattedProps?.[key] ?? item[key] ?? "";
function formatValue(item: IScope, key: string): string | undefined {
return item.__formattedProps?.[key] ?? item[key];
}

type DedupProperties = { [key: string]: boolean };
Expand Down

0 comments on commit 227c897

Please sign in to comment.