UNPKG

sh-or-cmd

Version:

Returns 'sh' or 'cmd' based on platform

24 lines (23 loc) 883 B
/// <reference types="node" /> export declare type Platform = NodeJS.Platform; export declare const platform: NodeJS.Platform; export declare function get<Win32 extends string, POSIX extends string>(options: get.Options<Win32, POSIX>): get.Result<Win32, POSIX>; export declare namespace get { interface Options<Win32 extends string, POSIX extends string> { readonly win32: Win32; readonly posix: POSIX; } type Result<Win32 extends string, POSIX extends string> = Win32 | POSIX; namespace Default { type Win32 = 'cmd'; type POSIX = 'sh'; type Options = get.Options<Win32, POSIX>; type Result = get.Result<Win32, POSIX>; const win32: Win32; const posix: POSIX; const options: Options; const result: Result; } } declare const _default: get.Result<"cmd", "sh">; export default _default;