tg-bot-reminder/node_modules/default-browser/index.d.ts
2023-08-13 16:48:04 +03:00

29 lines
624 B
TypeScript

export type Browser = {
/**
Human-readadable name of the browser.
*/
name: string;
/**
Unique ID for the browser on the current platform:
- On macOS, it's the ID in LaunchServices.
- On Linux, it's the desktop file ID (from `xdg-mime`).
- On Windows, it's an invented ID as Windows doesn't have IDs.
*/
id: string;
};
/**
Get the default browser for the current platform.
@returns A promise for the browser.
```
import defaultBrowser from 'default-browser';
console.log(await defaultBrowser());
//=> {name: 'Safari', id: 'com.apple.Safari'}
```
*/
export default function defaultBrowser(): Promise<Browser>;