(platform: NodeJS.Platform = process.platform)
| 116 | } |
| 117 | |
| 118 | public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions { |
| 119 | switch (platform) { |
| 120 | case 'darwin': |
| 121 | return 'macos'; |
| 122 | case 'win32': |
| 123 | return 'windows'; |
| 124 | case 'linux': |
| 125 | return 'linux'; |
| 126 | default: |
| 127 | throw new Error( |
| 128 | `Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'` |
| 129 | ); |
| 130 | } |
| 131 | } |
| 132 | } |
no outgoing calls
no test coverage detected