Skip to content

Commit

Permalink
🔧 Fixed exported types
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsoha authored Jan 22, 2023
1 parent 2f9ed60 commit cadebf2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coolmaster-client",
"version": "0.0.1-alpha.2",
"version": "0.0.1-alpha.3",
"description": "CoolMasterNet API Client for TypeScript",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/CoolMasterNetClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export class CoolMasterNetClient extends Commands.BaseCommand {
return new Commands.Settings(this.client)
}

public ls(uid?: string): Promise<Types.LSResponse> {
public ls(uid?: string): Promise<Types.LSResponse[]> {
return this.call('ls', Parsers.LSParser, [uid])
}

public ls2(uid?: string): Promise<Types.LSResponse> {
public ls2(uid?: string): Promise<Types.LSResponse[]> {
return this.call('ls2', Parsers.LSParser, [uid])
}

Expand Down
12 changes: 6 additions & 6 deletions src/commands/Properties.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseCommand } from './BaseCommand'
import { Mode, Speed } from '../types'
import { PropertiesParser } from '../parsers'
import { BaseCommand } from './BaseCommand'
import { PropertiesParser } from '../parsers'
import { Mode, Speed, PropertiesResponse } from '../types'


export type Operation = '-' | '+'
Expand All @@ -12,7 +12,7 @@ export class Properties extends BaseCommand {
.join('')
}

public all(): Promise<Properties> {
public all(): Promise<PropertiesResponse[]> {
return this.call('props', PropertiesParser)
}

Expand All @@ -24,14 +24,14 @@ export class Properties extends BaseCommand {
return this.callGeneric('props', [uid, 'visible', this.boolToInt(visible)])
}

public speed(uid: string, speeds: Array<Speed>, operation: Operation) {
public speed(uid: string, speeds: Speed[], operation: Operation) {
return this.callGeneric(
'props',
[uid, 'fspeed', this.joinOperations(speeds as string[], operation)]
)
}

public mode(uid: string, modes: Array<Mode>, operation: Operation) {
public mode(uid: string, modes: Mode[], operation: Operation) {
return this.callGeneric(
'props',
[uid, 'mode', this.joinOperations(modes as string[], operation)]
Expand Down

0 comments on commit cadebf2

Please sign in to comment.