|
3 | 3 | * Provides functionality to retrieve the machine ID of the current device. |
4 | 4 | */ |
5 | 5 |
|
6 | | -declare module 'native-machine-id' { |
7 | | - /** |
8 | | - * Gets the machine ID synchronously. |
9 | | - * @returns A string containing the machine ID. |
10 | | - */ |
11 | | - export function getMachineIdSync(): string; |
12 | | - |
13 | | - /** |
14 | | - * Gets the machine ID asynchronously. |
15 | | - * @returns A Promise that resolves to a string containing the machine ID. |
16 | | - */ |
17 | | - export function getMachineId(): Promise<string>; |
18 | | - |
19 | | - /** |
20 | | - * Gets a machine ID that is based on the original ID but is "hashed" for privacy. |
21 | | - * @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first. |
22 | | - * @param {string} [type='md5'] - The hashing algorithm to use. |
23 | | - * @returns A Promise that resolves to a string containing the hashed machine ID. |
24 | | - */ |
25 | | - export function machineIdSync(original?: string, type?: string): string; |
26 | | - |
27 | | - /** |
28 | | - * Gets a machine ID that is based on the original ID but is "hashed" for privacy. |
29 | | - * @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first. |
30 | | - * @param {string} [type='md5'] - The hashing algorithm to use. |
31 | | - * @returns A Promise that resolves to a string containing the hashed machine ID. |
32 | | - */ |
33 | | - export function machineId(original?: string, type?: string): Promise<string>; |
| 6 | +declare module "native-machine-id" { |
| 7 | + /** |
| 8 | + * Gets the machine ID synchronously. |
| 9 | + * @returns A string containing the machine ID. |
| 10 | + */ |
| 11 | + export function getMachineIdSync(): string; |
| 12 | + |
| 13 | + /** |
| 14 | + * Gets the machine ID asynchronously. |
| 15 | + * @returns A Promise that resolves to a string containing the machine ID. |
| 16 | + */ |
| 17 | + export function getMachineId(): Promise<string>; |
| 18 | + |
| 19 | + /** |
| 20 | + * Gets a machine ID that is based on the original ID but is "hashed" for privacy. |
| 21 | + * @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first. |
| 22 | + * @param {string} [type='md5'] - The hashing algorithm to use. |
| 23 | + * @returns A Promise that resolves to a string containing the hashed machine ID. |
| 24 | + */ |
| 25 | + export function machineIdSync(original?: string, type?: string): string; |
| 26 | + |
| 27 | + /** |
| 28 | + * Gets a machine ID that is based on the original ID but is "hashed" for privacy. |
| 29 | + * @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first. |
| 30 | + * @param {string} [type='md5'] - The hashing algorithm to use. |
| 31 | + * @returns A Promise that resolves to a string containing the hashed machine ID. |
| 32 | + */ |
| 33 | + export function machineId(original?: string, type?: string): Promise<string>; |
34 | 34 | } |
0 commit comments