Skip to content

Commit cc64b5c

Browse files
raman325claude
andauthored
fix: use optional properties instead of | undefined in result types (#1523)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f3bad4d commit cc64b5c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/lib/controller/outgoing_message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ export interface ControllerResultTypes {
4747
[ControllerCommand.provisionSmartStartNode]: Record<string, never>;
4848
[ControllerCommand.unprovisionSmartStartNode]: Record<string, never>;
4949
[ControllerCommand.getProvisioningEntry]: {
50-
entry: SmartStartProvisioningEntry | undefined;
50+
entry?: SmartStartProvisioningEntry;
5151
};
5252
[ControllerCommand.getProvisioningEntries]: {
5353
entries: SmartStartProvisioningEntry[];
5454
};
55-
[ControllerCommand.supportsFeature]: { supported: boolean | undefined };
55+
[ControllerCommand.supportsFeature]: { supported?: boolean };
5656
[ControllerCommand.backupNVMRaw]: { nvmData: string };
5757
[ControllerCommand.restoreNVM]: Record<string, never>;
5858
[ControllerCommand.setRFRegion]: { success: boolean };

src/lib/endpoint/outgoing_message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export interface EndpointResultTypes {
99
[EndpointCommand.controlsCC]: { controlled: boolean };
1010
[EndpointCommand.isCCSecure]: { secure: boolean };
1111
[EndpointCommand.getCCVersion]: { version: number };
12-
[EndpointCommand.getNodeUnsafe]: { node: NodeState | undefined };
13-
[EndpointCommand.tryGetNode]: { node: NodeState | undefined };
12+
[EndpointCommand.getNodeUnsafe]: { node?: NodeState };
13+
[EndpointCommand.tryGetNode]: { node?: NodeState };
1414
[EndpointCommand.setRawConfigParameterValue]: { result?: SupervisionResult };
1515
[EndpointCommand.getRawConfigParameterValue]: {
1616
value: MaybeNotKnown<ConfigValue>;

src/lib/outgoing_message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface OutgoingVersionMessage {
3232
type: "version";
3333
driverVersion: string;
3434
serverVersion: string;
35-
homeId: number | undefined;
35+
homeId?: number;
3636
minSchemaVersion: number;
3737
maxSchemaVersion: number;
3838
}

0 commit comments

Comments
 (0)