Skip to content

Commit 60f9df8

Browse files
authored
DATA-3444 (part 2) Add non-null assertions (#430)
1 parent 63c34f7 commit 60f9df8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/app/data-client.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ interface TabularDataPoint {
4343
resourceName: string;
4444
resourceSubtype: string;
4545
methodName: string;
46-
timeCaptured: Date | undefined;
46+
timeCaptured: Date;
4747
organizationId: string;
4848
locationId: string;
4949
robotName: string;
5050
robotId: string;
5151
partName: string;
52-
methodParameters: JsonValue | undefined;
52+
methodParameters: JsonValue;
5353
tags: string[];
54-
payload: JsonValue | undefined;
54+
payload: JsonValue;
5555
}
5656

5757
export type Dataset = Partial<PBDataset> & {
@@ -118,15 +118,15 @@ export class DataClient {
118118
resourceName: response.resourceName,
119119
resourceSubtype: response.resourceSubtype,
120120
methodName: response.methodName,
121-
timeCaptured: response.timeCaptured?.toDate(),
121+
timeCaptured: response.timeCaptured!.toDate(), // eslint-disable-line @typescript-eslint/no-non-null-assertion
122122
organizationId: response.organizationId,
123123
locationId: response.locationId,
124124
robotName: response.robotName,
125125
robotId: response.robotId,
126126
partName: response.partName,
127-
methodParameters: response.methodParameters?.toJson(),
127+
methodParameters: response.methodParameters!.toJson(), // eslint-disable-line @typescript-eslint/no-non-null-assertion
128128
tags: response.tags,
129-
payload: response.payload?.toJson(),
129+
payload: response.payload!.toJson(), // eslint-disable-line @typescript-eslint/no-non-null-assertion
130130
});
131131
}
132132

0 commit comments

Comments
 (0)