Skip to content

Commit

Permalink
DATA-3444 (part 2) Add non-null assertions (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
katiepeters authored Dec 18, 2024
1 parent 63c34f7 commit 60f9df8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/data-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ interface TabularDataPoint {
resourceName: string;
resourceSubtype: string;
methodName: string;
timeCaptured: Date | undefined;
timeCaptured: Date;
organizationId: string;
locationId: string;
robotName: string;
robotId: string;
partName: string;
methodParameters: JsonValue | undefined;
methodParameters: JsonValue;
tags: string[];
payload: JsonValue | undefined;
payload: JsonValue;
}

export type Dataset = Partial<PBDataset> & {
Expand Down Expand Up @@ -118,15 +118,15 @@ export class DataClient {
resourceName: response.resourceName,
resourceSubtype: response.resourceSubtype,
methodName: response.methodName,
timeCaptured: response.timeCaptured?.toDate(),
timeCaptured: response.timeCaptured!.toDate(), // eslint-disable-line @typescript-eslint/no-non-null-assertion
organizationId: response.organizationId,
locationId: response.locationId,
robotName: response.robotName,
robotId: response.robotId,
partName: response.partName,
methodParameters: response.methodParameters?.toJson(),
methodParameters: response.methodParameters!.toJson(), // eslint-disable-line @typescript-eslint/no-non-null-assertion
tags: response.tags,
payload: response.payload?.toJson(),
payload: response.payload!.toJson(), // eslint-disable-line @typescript-eslint/no-non-null-assertion
});
}

Expand Down

0 comments on commit 60f9df8

Please sign in to comment.