Files
cmbone/frontend/bindings/cmbone/internal/models/models.ts
T

47 lines
1.1 KiB
TypeScript

// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";
export class Hotkey {
/**
* 热键ID
*/
"id": number;
/**
* 键码
*/
"keycode": number;
/**
* 修饰键
*/
"modifiers": number;
/** Creates a new Hotkey instance. */
constructor($$source: Partial<Hotkey> = {}) {
if (!("id" in $$source)) {
this["id"] = 0;
}
if (!("keycode" in $$source)) {
this["keycode"] = 0;
}
if (!("modifiers" in $$source)) {
this["modifiers"] = 0;
}
Object.assign(this, $$source);
}
/**
* Creates a new Hotkey instance from a string or object.
*/
static createFrom($$source: any = {}): Hotkey {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Hotkey($$parsedSource as Partial<Hotkey>);
}
}