/**
 * Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License)
 * Copyright (c) 2016, Daniel Imms (MIT License).
 * Copyright (c) 2018, Microsoft Corporation (MIT License).
 */ import * as path from 'path' ; import { Terminal as BaseTerminal } from './terminal' ; import { ITerminal , IPtyOpenOptions , IPtyForkOptions } from './interfaces' ; import { ArgvOrCommandLine } from './types' ; let terminalCtor ; if ( process . platform === 'win32' ) { terminalCtor = require ( './windowsTerminal' ) . WindowsTerminal ; } else { terminalCtor = require ( './unixTerminal' ) . UnixTerminal ; } param file param args param options throws see CommandLineToArgvW see Parsing see GetCommandLine export function spawn ( file ? , args ? , opt ? ) { return new terminalCtor ( file , args , opt ) ; } deprecated export function fork ( file ? , args ? , opt ? ) { return new terminalCtor ( file , args , opt ) ; } deprecated export function createTerminal ( file ? , args ? , opt ? ) { return new terminalCtor ( file , args , opt ) ; } export function open ( options ) { return terminalCtor . open ( options ) ; } /**
 * Expose the native API when not Windows, note that this is not public API and
 * could be removed at any time.
 */ export const native = ( process . platform !== 'win32' ? require ( path . join ( '..' , 'build' , 'Release' , 'pty.node' ) ) : null ) ;