mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-11 12:40:15 +00:00
Add background option for macOS
This commit is contained in:
11
types/open/index.d.ts
vendored
11
types/open/index.d.ts
vendored
@@ -1,9 +1,10 @@
|
||||
// Type definitions for open 6.0
|
||||
// Type definitions for open 6.1
|
||||
// Project: https://github.com/sindresorhus/open
|
||||
// Definitions by: Shinnosuke Watanabe <https://github.com/shinnn>,
|
||||
// Maxime LUCE <https://github.com/SomaticIT>,
|
||||
// Tommy Lent <https://github.com/tlent>,
|
||||
// Florian Keller <https://github.com/ffflorian>
|
||||
// Florian Keller <https://github.com/ffflorian>,
|
||||
// Sun Knudsen <https://github.com/sunknudsen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -40,6 +41,12 @@ declare namespace Open {
|
||||
*/
|
||||
wait?: boolean;
|
||||
|
||||
/**
|
||||
* Do not bring the app to the foreground (macOS only).
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
background?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the app to open the `target` with, or an array with the app and app arguments.
|
||||
* The app name is platform dependent. Don't hard code it in reusable modules.
|
||||
|
||||
@@ -5,4 +5,6 @@ open('foo'); // $ExpectType Promise<ChildProcess>
|
||||
open('foo', { app: 'bar' }); // $ExpectType Promise<ChildProcess>
|
||||
open('foo', { app: ['bar', '--arg'] }); // $ExpectType Promise<ChildProcess>
|
||||
open('foo', { app: 'bar', wait: false }); // $ExpectType Promise<ChildProcess>
|
||||
open('foo', { app: 'bar', background: false }); // $ExpectType Promise<ChildProcess>
|
||||
open('foo', { app: ['bar', '--arg'], wait: false }); // $ExpectType Promise<ChildProcess>
|
||||
open('foo', { app: ['bar', '--arg'], background: false }); // $ExpectType Promise<ChildProcess>
|
||||
|
||||
Reference in New Issue
Block a user