From dcb2cf591a0fb3f66f2e254201b0ebe2b7023061 Mon Sep 17 00:00:00 2001 From: JoergAtGithub Date: Wed, 8 Jun 2022 21:52:21 +0200 Subject: [PATCH] Formatting --- res/controllers/console-api.d.ts | 50 +++++++++++++----------- res/controllers/hid-controller-api.d.ts | 13 +++--- res/controllers/midi-controller-api.d.ts | 17 ++++++-- 3 files changed, 47 insertions(+), 33 deletions(-) diff --git a/res/controllers/console-api.d.ts b/res/controllers/console-api.d.ts index 0e6ed1965836..171cb8a098c4 100644 --- a/res/controllers/console-api.d.ts +++ b/res/controllers/console-api.d.ts @@ -7,84 +7,88 @@ declare class QJSEngineConsoleExtension { /** * Prints debugging information to the console. (same as console.debug) */ - public log(message? : any, ...args : any[]) : void; + public log(message?:any, ...args:any[]):void; /** * Prints debugging information to the console. (same as console.log) */ - public debug(message? : any, ...args : any[]) : void; + public debug(message?:any, ...args:any[]):void; /** * Prints information to the console. */ - public info(message? : any, ...args : any[]) : void; + public info(message?:any, ...args:any[]):void; /** * Prints a warning message to the console. */ - public warn(message? : any, ...args : any[]) : void; + public warn(message?:any, ...args:any[]):void; /** * Prints an error message to the console. */ - public error(message? : any, ...args : any[]) : void; + public error(message?:any, ...args:any[]):void; /** * Tests that an expression is true. * - * @param {boolean} [expression] If not true, it writes an optional message to the console and prints the stack trace. + * @param expression If not true, it writes an optional message to the console and prints the stack trace. + * @param message + * @param args */ - public assert(expression : boolean, message? : string, ...args: any[]) : void; + public assert(expression:boolean, message?:string, ...args: any[]):void; /** * Starts the time measurement, which will be printed by timeEnd - * - * @param {string} [label] string argument that identifies the measurement. + * + * @param label string argument that identifies the measurement. */ - public time(label? : string) : void; + public time(label?:string):void; /** * Logs the time (in milliseconds) that was spent since the call of the time method. - * - * @param {string} [label] string argument that identifies the measurement. + * + * @param label string argument that identifies the measurement. */ - public timeEnd(label? : string) : void; + public timeEnd(label?:string):void; /** * Prints the stack trace of the JavaScript execution at the point where it was called. * This stack trace information contains the function name, file name, line number, and column number. * The stack trace is limited to last 10 stack frames. - * - * @param {*} [message] - * @param {...any[]} args + * + * @param message + * @param args */ - public trace(message? : any, ...args : any[]) : void; + public trace(message?:any, ...args:any[]):void; /** * Prints the current number of times a particular piece of code has run, along with a message. * - * @param {string} [label] + * @param label */ - public count(label? : string) : void; + public count(label?:string):void; /** * Turns on the JavaScript profiler. * @deprecated Not usable for controller mappings, because JavaScript profile does only workin GUI thread: https://bugreports.qt.io/browse/QTBUG-65419 * */ - public profile(label? : string) : void; + public profile(label?:string):void; /** * Turns off the JavaScript profiler. * @deprecated Not usable for controller mappings, because JavaScript profile does only workin GUI thread: https://bugreports.qt.io/browse/QTBUG-65419 * */ - public profileEnd(label? : string) : void; + public profileEnd(label?:string):void; /** * Prints an error message together with the stack trace of JavaScript execution at the point where it is called. - * + * + * @param message + * @param args */ - public exception(message? : any, ...args : any[]) : void; + public exception(message?:any, ...args:any[]):void; } var console = new QJSEngineConsoleExtension; diff --git a/res/controllers/hid-controller-api.d.ts b/res/controllers/hid-controller-api.d.ts index 1f7864c4a417..2a650da5b004 100644 --- a/res/controllers/hid-controller-api.d.ts +++ b/res/controllers/hid-controller-api.d.ts @@ -5,21 +5,22 @@ declare class HidControllerJSProxy { * @param dataList Data to send as list of bytes * @param length Unused optional argument */ - public send(dataList : number[], length : number=0) : void; + public send(dataList:number[], length:number=0):void; + /** Sends HID OutputReport to HID device * @param dataList Data to send as list of bytes * @param length Unused but mandatory argument * @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use ReportIDs * @param resendUnchangedReport If set, the report will also be send, if the data are unchanged since last sending */ - public send(dataList : number[], length : number, reportID : number, resendUnchangedReport:boolean = false) : void; + public send(dataList:number[], length:number, reportID:number, resendUnchangedReport:boolean = false):void; /** Sends an OutputReport to HID device * @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use ReportIDs * @param dataArray Data to send as byte array (Javascript type Uint8Array) * @param resendUnchangedReport If set, the report will also be send, if the data are unchanged since last sending */ - public sendOutputReport(reportID : number, dataArray : ArrayBuffer, resendUnchangedReport:boolean = false) : void; + public sendOutputReport(reportID:number, dataArray:ArrayBuffer, resendUnchangedReport:boolean = false):void; /** getInputReport receives an InputReport from the HID device on request. * @details This can be used on startup to initialize the knob positions in Mixxx @@ -28,19 +29,19 @@ declare class HidControllerJSProxy { * @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use * @return Returns report data with ReportID byte as prefix */ - public getInputReport(reportID : number) : Uint8Array; + public getInputReport(reportID:number):Uint8Array; /** Sends a FeatureReport to HID device * @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use * @param reportData Data to send as byte array */ - public sendFeatureReport(reportID : number, reportData : ArrayBuffer) : void; + public sendFeatureReport(reportID:number, reportData:ArrayBuffer):void; /** getFeatureReport receives a FeatureReport from the HID device on request. * @param reportID 1...255 for HID devices that uses ReportIDs - or 0 for devices, which don't use * @return The returned array matches the input format of sendFeatureReport, * allowing it to be read, modified and sent it back to the controller. */ - public getFeatureReport(reportID : number) : Uint8Array; + public getFeatureReport(reportID:number):Uint8Array; } var controller = new HidControllerJSProxy; diff --git a/res/controllers/midi-controller-api.d.ts b/res/controllers/midi-controller-api.d.ts index d174c803e71d..4413cab6600a 100644 --- a/res/controllers/midi-controller-api.d.ts +++ b/res/controllers/midi-controller-api.d.ts @@ -1,11 +1,20 @@ declare class MidiControllerJSProxy { - public sendShortMsg(status : number, byte1 : number, byte2 : number) : void; + public :ShortMsg(status:number, byte1:number, byte2:number):void; - /** Alias for sendSysexMsg */ - public send(dataList : number[], length : number=0) : void; - public sendSysexMsg(dataList : number[], length : number=0) : void; + /** + * Alias for :SysexMsg + * @param dataList + * @param length + */ + public :(dataList:number[], length:number=0):void; + /** + * + * @param dataList + * @param length + */ + public :SysexMsg(dataList:number[], length:number=0):void; } var controller = new MidiControllerJSProxy;