Skip to content

Commit 83fedab

Browse files
committed
Fix TypeScript type assertions for both rawResponse branches in spot.ts
1 parent eecb404 commit 83fedab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/rest/info/spot.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class SpotInfoAPI {
1515
async getSpotMeta(rawResponse: boolean = false): Promise<SpotMeta> {
1616
const response = await this.httpApi.makeRequest({ type: InfoType.SPOT_META });
1717
return rawResponse
18-
? response
18+
? (response as SpotMeta)
1919
: ((await this.symbolConversion.convertResponse(
2020
response,
2121
['name', 'coin', 'symbol'],
@@ -32,7 +32,7 @@ export class SpotInfoAPI {
3232
user: user,
3333
});
3434
return rawResponse
35-
? response
35+
? (response as SpotClearinghouseState)
3636
: ((await this.symbolConversion.convertResponse(
3737
response,
3838
['name', 'coin', 'symbol'],
@@ -43,7 +43,7 @@ export class SpotInfoAPI {
4343
async getSpotMetaAndAssetCtxs(rawResponse: boolean = false): Promise<SpotMetaAndAssetCtxs> {
4444
const response = await this.httpApi.makeRequest({ type: InfoType.SPOT_META_AND_ASSET_CTXS });
4545
return rawResponse
46-
? response
46+
? (response as SpotMetaAndAssetCtxs)
4747
: ((await this.symbolConversion.convertResponse(response)) as SpotMetaAndAssetCtxs);
4848
}
4949

0 commit comments

Comments
 (0)