DefinitelyTyped/types/open/open-tests.ts
2019-04-07 07:33:49 -04:00

11 lines
576 B
TypeScript

import open = require('open');
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>