File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,25 @@ export type FilteredResults = {
83
83
isFiltered : boolean ;
84
84
} ;
85
85
86
+ export type PlatformOS =
87
+ | 'linux64'
88
+ | 'linux1804'
89
+ | 'linux2204'
90
+ | 'osx'
91
+ | 'macosx1014'
92
+ | 'macosx1015'
93
+ | 'macosx1100'
94
+ | 'macosx1300'
95
+ | 'macosx1400'
96
+ | 'macosx1470'
97
+ | 'win32'
98
+ | 'win64'
99
+ | 'windows7'
100
+ | 'windows10'
101
+ | 'windows11'
102
+ | 'windows2012'
103
+ | 'windows' ;
104
+
86
105
// TODO: Needs review: as new platforms are available the type will need updates
87
106
export type Platform =
88
107
| 'linux32'
Original file line number Diff line number Diff line change 1
1
import type { PlatformShortName } from '../types/state' ;
2
+ import { PlatformOS } from '../types/types' ;
2
3
3
4
export const getPlatformShortName = (
4
5
platformName : string ,
@@ -35,7 +36,7 @@ const osMapping = {
35
36
} ;
36
37
37
38
const extractPlatformWithOs = ( platform : string ) => {
38
- const name = osMapping [ platform . split ( '-' ) [ 0 ] ] as string ;
39
+ const name = osMapping [ platform . split ( '-' ) [ 0 ] as PlatformOS ] ;
39
40
40
41
if ( name ) return name ;
41
42
You can’t perform that action at this time.
0 commit comments