Skip to content

Commit

Permalink
Memoize getDeviceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
baku89 committed Oct 6, 2023
1 parent 136e535 commit 6c20499
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TethrPTPUSB/TethrPTPUSB.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {times} from 'lodash'
import {Memoize} from 'typescript-memoize'

import {
Aperture,
Expand Down Expand Up @@ -595,6 +596,7 @@ export class TethrPTPUSB extends Tethr {
return devicePropsSupported.includes(code)
}

@Memoize()
protected async getDeviceInfo(): Promise<DeviceInfo> {
return await TethrPTPUSB.getDeviceInfo(this.device)
}
Expand Down

0 comments on commit 6c20499

Please sign in to comment.