Skip to content

Commit 3bdf34c

Browse files
committed
fix: corrected type returned by default drivers command
1 parent b8da022 commit 3bdf34c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/flat-deers-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smartthings/core-sdk": patch
3+
---
4+
5+
fix: corrected type returned by default drivers command

src/endpoint/drivers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class DriversEndpoint extends Endpoint {
219219
* List drivers in the default channel. (The default channel in this context is a channel
220220
* that users do not need to subscribe to.)
221221
*/
222-
public async listDefault(): Promise<EdgeDriverSummary[]> {
222+
public async listDefault(): Promise<EdgeDriver[]> {
223223
return this.client.getPagedItems('default')
224224
}
225225

test/unit/drivers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NoOpAuthenticator } from '../../src/authenticator'
2-
import { DriversEndpoint, EdgeDriverSummary } from '../../src/endpoint/drivers'
2+
import {DriversEndpoint, EdgeDriver, EdgeDriverSummary} from '../../src/endpoint/drivers'
33
import { EndpointClient } from '../../src/endpoint-client'
44

55

@@ -51,7 +51,7 @@ describe('DriversEndpoint', () => {
5151
})
5252

5353
test('listDefault', async () => {
54-
const drivers = [{ driverId: 'listed-in-channel-id' }] as EdgeDriverSummary[]
54+
const drivers = [{ driverId: 'listed-in-channel-id' }] as EdgeDriver[]
5555
getPagedItemsSpy.mockResolvedValueOnce(drivers)
5656

5757
expect(await driversEndpoint.listDefault()).toBe(drivers)

0 commit comments

Comments
 (0)