diff --git a/package.json b/package.json index d1d5f89..8a71455 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/CoolMasterNetClient.ts b/src/CoolMasterNetClient.ts index fbddd9d..8a02746 100644 --- a/src/CoolMasterNetClient.ts +++ b/src/CoolMasterNetClient.ts @@ -13,11 +13,11 @@ export class CoolMasterNetClient extends Commands.BaseCommand { return new Commands.Settings(this.client) } - public ls(uid?: string): Promise { + public ls(uid?: string): Promise { return this.call('ls', Parsers.LSParser, [uid]) } - public ls2(uid?: string): Promise { + public ls2(uid?: string): Promise { return this.call('ls2', Parsers.LSParser, [uid]) } diff --git a/src/commands/Properties.ts b/src/commands/Properties.ts index 51f7e32..2cfc931 100644 --- a/src/commands/Properties.ts +++ b/src/commands/Properties.ts @@ -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 = '-' | '+' @@ -12,7 +12,7 @@ export class Properties extends BaseCommand { .join('') } - public all(): Promise { + public all(): Promise { return this.call('props', PropertiesParser) } @@ -24,14 +24,14 @@ export class Properties extends BaseCommand { return this.callGeneric('props', [uid, 'visible', this.boolToInt(visible)]) } - public speed(uid: string, speeds: Array, 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, operation: Operation) { + public mode(uid: string, modes: Mode[], operation: Operation) { return this.callGeneric( 'props', [uid, 'mode', this.joinOperations(modes as string[], operation)]