fmt [skip ci]

pull/395/head
Lucas Nogueira 2 years ago
parent 12ee7080b7
commit ed081cdcca
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -115,7 +115,7 @@ class Body {
* @param data The body data. * @param data The body data.
* *
* @returns The body object ready to be used on the POST and PUT requests. * @returns The body object ready to be used on the POST and PUT requests.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
static form(data: Record<string, Part> | FormData): Body { static form(data: Record<string, Part> | FormData): Body {
@ -168,7 +168,7 @@ class Body {
* @param data The body JSON object. * @param data The body JSON object.
* *
* @returns The body object ready to be used on the POST and PUT requests. * @returns The body object ready to be used on the POST and PUT requests.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
static json<K extends string | number | symbol, V>(data: Record<K, V>): Body { static json<K extends string | number | symbol, V>(data: Record<K, V>): Body {
@ -186,7 +186,7 @@ class Body {
* @param value The body string. * @param value The body string.
* *
* @returns The body object ready to be used on the POST and PUT requests. * @returns The body object ready to be used on the POST and PUT requests.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
static text(value: string): Body { static text(value: string): Body {
@ -204,7 +204,7 @@ class Body {
* @param bytes The body byte array. * @param bytes The body byte array.
* *
* @returns The body object ready to be used on the POST and PUT requests. * @returns The body object ready to be used on the POST and PUT requests.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
static bytes( static bytes(

@ -165,22 +165,22 @@ enum ScheduleEvery {
type ScheduleData = type ScheduleData =
| { | {
kind: "At"; kind: "At";
data: { data: {
date: Date; date: Date;
repeating: boolean; repeating: boolean;
}; };
} }
| { | {
kind: "Interval"; kind: "Interval";
data: ScheduleInterval; data: ScheduleInterval;
} }
| { | {
kind: "Every"; kind: "Every";
data: { data: {
interval: ScheduleEvery; interval: ScheduleEvery;
};
}; };
};
class Schedule { class Schedule {
kind: string; kind: string;

@ -115,7 +115,7 @@ interface ChildProcess<O extends IOPayload> {
* @param args Program arguments. * @param args Program arguments.
* @param options Configuration for the process spawn. * @param options Configuration for the process spawn.
* @returns A promise resolving to the process id. * @returns A promise resolving to the process id.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async function execute<O extends IOPayload>( async function execute<O extends IOPayload>(
@ -257,7 +257,7 @@ class EventEmitter<E extends Record<string, any>> {
* to each. * to each.
* *
* @returns `true` if the event had listeners, `false` otherwise. * @returns `true` if the event had listeners, `false` otherwise.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
emit<N extends keyof E>(eventName: N, arg: E[typeof eventName]): boolean { emit<N extends keyof E>(eventName: N, arg: E[typeof eventName]): boolean {
@ -354,7 +354,7 @@ class Child {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async write(data: IOPayload): Promise<void> { async write(data: IOPayload): Promise<void> {
@ -369,7 +369,7 @@ class Child {
* Kills the child process. * Kills the child process.
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async kill(): Promise<void> { async kill(): Promise<void> {
@ -512,7 +512,7 @@ class Command<O extends IOPayload> extends EventEmitter<CommandEvents> {
* Executes the command as a child process, returning a handle to it. * Executes the command as a child process, returning a handle to it.
* *
* @returns A promise resolving to the child process handle. * @returns A promise resolving to the child process handle.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async spawn(): Promise<Child> { async spawn(): Promise<Child> {
@ -552,7 +552,7 @@ class Command<O extends IOPayload> extends EventEmitter<CommandEvents> {
* ``` * ```
* *
* @returns A promise resolving to the child process output. * @returns A promise resolving to the child process output.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async execute(): Promise<ChildProcess<O>> { async execute(): Promise<ChildProcess<O>> {

@ -179,7 +179,7 @@ export class Store {
* @param key * @param key
* @param cb * @param cb
* @returns A promise resolving to a function to unlisten to the event. * @returns A promise resolving to a function to unlisten to the event.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async onKeyChange<T>( async onKeyChange<T>(
@ -197,7 +197,7 @@ export class Store {
* Listen to changes on the store. * Listen to changes on the store.
* @param cb * @param cb
* @returns A promise resolving to a function to unlisten to the event. * @returns A promise resolving to a function to unlisten to the event.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async onChange<T>( async onChange<T>(

@ -239,7 +239,7 @@ class ProcedureExecutor {
* Gets the Ed25519 public key of a SLIP10 private key. * Gets the Ed25519 public key of a SLIP10 private key.
* @param privateKeyLocation The location of the private key. Must be the `outputLocation` of a previous call to `deriveSLIP10`. * @param privateKeyLocation The location of the private key. Must be the `outputLocation` of a previous call to `deriveSLIP10`.
* @returns A promise resolving to the public key hex string. * @returns A promise resolving to the public key hex string.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async getEd25519PublicKey(privateKeyLocation: Location): Promise<Uint8Array> { async getEd25519PublicKey(privateKeyLocation: Location): Promise<Uint8Array> {
@ -262,7 +262,7 @@ class ProcedureExecutor {
* @param privateKeyLocation The location of the record where the private key is stored. Must be the `outputLocation` of a previous call to `deriveSLIP10`. * @param privateKeyLocation The location of the record where the private key is stored. Must be the `outputLocation` of a previous call to `deriveSLIP10`.
* @param msg The message to sign. * @param msg The message to sign.
* @returns A promise resolving to the signature hex string. * @returns A promise resolving to the signature hex string.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async signEd25519( async signEd25519(

@ -306,7 +306,7 @@ class WebviewWindowHandle {
* @param handler Event handler. * @param handler Event handler.
* @returns A promise resolving to a function to unlisten to the event. * @returns A promise resolving to a function to unlisten to the event.
* Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async listen<T>( async listen<T>(
@ -341,7 +341,7 @@ class WebviewWindowHandle {
* @param handler Event handler. * @param handler Event handler.
* @returns A promise resolving to a function to unlisten to the event. * @returns A promise resolving to a function to unlisten to the event.
* Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async once<T>(event: string, handler: EventCallback<T>): Promise<UnlistenFn> { async once<T>(event: string, handler: EventCallback<T>): Promise<UnlistenFn> {
@ -410,7 +410,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns The window's monitor scale factor. * @returns The window's monitor scale factor.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async scaleFactor(): Promise<number> { async scaleFactor(): Promise<number> {
@ -428,7 +428,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns The window's inner position. * @returns The window's inner position.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async innerPosition(): Promise<PhysicalPosition> { async innerPosition(): Promise<PhysicalPosition> {
@ -451,7 +451,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns The window's outer position. * @returns The window's outer position.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async outerPosition(): Promise<PhysicalPosition> { async outerPosition(): Promise<PhysicalPosition> {
@ -475,7 +475,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns The window's inner size. * @returns The window's inner size.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async innerSize(): Promise<PhysicalSize> { async innerSize(): Promise<PhysicalSize> {
@ -499,7 +499,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns The window's outer size. * @returns The window's outer size.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async outerSize(): Promise<PhysicalSize> { async outerSize(): Promise<PhysicalSize> {
@ -522,7 +522,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns Whether the window is in fullscreen mode or not. * @returns Whether the window is in fullscreen mode or not.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async isFullscreen(): Promise<boolean> { async isFullscreen(): Promise<boolean> {
@ -556,7 +556,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns Whether the window is maximized or not. * @returns Whether the window is maximized or not.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async isMaximized(): Promise<boolean> { async isMaximized(): Promise<boolean> {
@ -574,7 +574,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns Whether the window is decorated or not. * @returns Whether the window is decorated or not.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async isDecorated(): Promise<boolean> { async isDecorated(): Promise<boolean> {
@ -592,7 +592,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns Whether the window is resizable or not. * @returns Whether the window is resizable or not.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async isResizable(): Promise<boolean> { async isResizable(): Promise<boolean> {
@ -610,7 +610,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns Whether the window is visible or not. * @returns Whether the window is visible or not.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async isVisible(): Promise<boolean> { async isVisible(): Promise<boolean> {
@ -649,7 +649,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns The window theme. * @returns The window theme.
* *
* @since 2.0.0 * @since 2.0.0
* */ * */
async theme(): Promise<Theme | null> { async theme(): Promise<Theme | null> {
@ -670,7 +670,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param resizable * @param resizable
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async center(): Promise<void> { async center(): Promise<void> {
@ -699,7 +699,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param resizable * @param resizable
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async requestUserAttention( async requestUserAttention(
@ -730,7 +730,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param resizable * @param resizable
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setResizable(resizable: boolean): Promise<void> { async setResizable(resizable: boolean): Promise<void> {
@ -750,7 +750,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param title The new title * @param title The new title
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setTitle(title: string): Promise<void> { async setTitle(title: string): Promise<void> {
@ -769,7 +769,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async maximize(): Promise<void> { async maximize(): Promise<void> {
@ -787,7 +787,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async unmaximize(): Promise<void> { async unmaximize(): Promise<void> {
@ -805,7 +805,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async toggleMaximize(): Promise<void> { async toggleMaximize(): Promise<void> {
@ -823,7 +823,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async minimize(): Promise<void> { async minimize(): Promise<void> {
@ -841,7 +841,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async unminimize(): Promise<void> { async unminimize(): Promise<void> {
@ -859,7 +859,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async show(): Promise<void> { async show(): Promise<void> {
@ -877,7 +877,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async hide(): Promise<void> { async hide(): Promise<void> {
@ -895,7 +895,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async close(): Promise<void> { async close(): Promise<void> {
@ -914,7 +914,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param decorations Whether the window should have borders and bars. * @param decorations Whether the window should have borders and bars.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setDecorations(decorations: boolean): Promise<void> { async setDecorations(decorations: boolean): Promise<void> {
@ -962,7 +962,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param alwaysOnTop Whether the window should always be on top of other windows or not. * @param alwaysOnTop Whether the window should always be on top of other windows or not.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setAlwaysOnTop(alwaysOnTop: boolean): Promise<void> { async setAlwaysOnTop(alwaysOnTop: boolean): Promise<void> {
@ -1001,7 +1001,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param size The logical or physical inner size. * @param size The logical or physical inner size.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setSize(size: LogicalSize | PhysicalSize): Promise<void> { async setSize(size: LogicalSize | PhysicalSize): Promise<void> {
@ -1033,7 +1033,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param size The logical or physical inner size, or `null` to unset the constraint. * @param size The logical or physical inner size, or `null` to unset the constraint.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setMinSize( async setMinSize(
@ -1049,12 +1049,12 @@ class WindowManager extends WebviewWindowHandle {
label: this.label, label: this.label,
value: size value: size
? { ? {
type: size.type, type: size.type,
data: { data: {
width: size.width, width: size.width,
height: size.height, height: size.height,
}, },
} }
: null, : null,
}); });
} }
@ -1069,7 +1069,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param size The logical or physical inner size, or `null` to unset the constraint. * @param size The logical or physical inner size, or `null` to unset the constraint.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setMaxSize( async setMaxSize(
@ -1085,12 +1085,12 @@ class WindowManager extends WebviewWindowHandle {
label: this.label, label: this.label,
value: size value: size
? { ? {
type: size.type, type: size.type,
data: { data: {
width: size.width, width: size.width,
height: size.height, height: size.height,
}, },
} }
: null, : null,
}); });
} }
@ -1105,7 +1105,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param position The new position, in logical or physical pixels. * @param position The new position, in logical or physical pixels.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setPosition( async setPosition(
@ -1142,7 +1142,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param fullscreen Whether the window should go to fullscreen or not. * @param fullscreen Whether the window should go to fullscreen or not.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setFullscreen(fullscreen: boolean): Promise<void> { async setFullscreen(fullscreen: boolean): Promise<void> {
@ -1161,7 +1161,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setFocus(): Promise<void> { async setFocus(): Promise<void> {
@ -1187,7 +1187,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param icon Icon bytes or path to the icon file. * @param icon Icon bytes or path to the icon file.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setIcon(icon: string | Uint8Array): Promise<void> { async setIcon(icon: string | Uint8Array): Promise<void> {
@ -1211,7 +1211,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param skip true to hide window icon, false to show it. * @param skip true to hide window icon, false to show it.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setSkipTaskbar(skip: boolean): Promise<void> { async setSkipTaskbar(skip: boolean): Promise<void> {
@ -1239,7 +1239,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param grab `true` to grab the cursor icon, `false` to release it. * @param grab `true` to grab the cursor icon, `false` to release it.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setCursorGrab(grab: boolean): Promise<void> { async setCursorGrab(grab: boolean): Promise<void> {
@ -1265,7 +1265,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param visible If `false`, this will hide the cursor. If `true`, this will show the cursor. * @param visible If `false`, this will hide the cursor. If `true`, this will show the cursor.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setCursorVisible(visible: boolean): Promise<void> { async setCursorVisible(visible: boolean): Promise<void> {
@ -1285,7 +1285,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param icon The new cursor icon. * @param icon The new cursor icon.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setCursorIcon(icon: CursorIcon): Promise<void> { async setCursorIcon(icon: CursorIcon): Promise<void> {
@ -1305,7 +1305,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param position The new cursor position. * @param position The new cursor position.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setCursorPosition( async setCursorPosition(
@ -1343,7 +1343,7 @@ class WindowManager extends WebviewWindowHandle {
* *
* @param ignore `true` to ignore the cursor events; `false` to process them as usual. * @param ignore `true` to ignore the cursor events; `false` to process them as usual.
* @returns A promise indicating the success or failure of the operation. * @returns A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async setIgnoreCursorEvents(ignore: boolean): Promise<void> { async setIgnoreCursorEvents(ignore: boolean): Promise<void> {
@ -1362,7 +1362,7 @@ class WindowManager extends WebviewWindowHandle {
* ``` * ```
* *
* @return A promise indicating the success or failure of the operation. * @return A promise indicating the success or failure of the operation.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
async startDragging(): Promise<void> { async startDragging(): Promise<void> {
@ -1718,7 +1718,7 @@ class WebviewWindow extends WindowManager {
* *
* * @param label The unique webview window label. Must be alphanumeric: `a-zA-Z-/:_`. * * @param label The unique webview window label. Must be alphanumeric: `a-zA-Z-/:_`.
* @returns The WebviewWindow instance to communicate with the webview. * @returns The WebviewWindow instance to communicate with the webview.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
constructor(label: WindowLabel, options: WindowOptions = {}) { constructor(label: WindowLabel, options: WindowOptions = {}) {
@ -1747,7 +1747,7 @@ class WebviewWindow extends WindowManager {
* *
* @param label The webview window label. * @param label The webview window label.
* @returns The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist. * @returns The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist.
* *
* @since 2.0.0 * @since 2.0.0
*/ */
static getByLabel(label: string): WebviewWindow | null { static getByLabel(label: string): WebviewWindow | null {
@ -1892,11 +1892,11 @@ function mapMonitor(m: Monitor | null): Monitor | null {
return m === null return m === null
? null ? null
: { : {
name: m.name, name: m.name,
scaleFactor: m.scaleFactor, scaleFactor: m.scaleFactor,
position: mapPhysicalPosition(m.position), position: mapPhysicalPosition(m.position),
size: mapPhysicalSize(m.size), size: mapPhysicalSize(m.size),
}; };
} }
function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition { function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition {

Loading…
Cancel
Save