From 60f9df83a0748cae8c6f1acc193b8df8682d8d83 Mon Sep 17 00:00:00 2001 From: Katie Peters Date: Wed, 18 Dec 2024 13:48:00 -0500 Subject: [PATCH] DATA-3444 (part 2) Add non-null assertions (#430) --- src/app/data-client.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/data-client.ts b/src/app/data-client.ts index 75b3de978..d9d233338 100644 --- a/src/app/data-client.ts +++ b/src/app/data-client.ts @@ -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 & { @@ -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 }); }