Skip to content

Commit 658d7f4

Browse files
authored
docs: update doCommand method example code (#554)
1 parent 834a208 commit 658d7f4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/types.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ export interface Resource {
1717
* @example
1818
*
1919
* ```ts
20-
* const result = await resource.doCommand({
21-
* name: 'myCommand',
22-
* args: { key: 'value' },
23-
* });
20+
* import { Struct } from '@viamrobotics/sdk';
21+
*
22+
* const result = await resource.doCommand(
23+
* Struct.fromJson({
24+
* myCommand: { key: 'value' },
25+
* })
26+
* );
2427
* ```
2528
*
2629
* @param command - The command to execute.

0 commit comments

Comments
 (0)