File tree 5 files changed +389
-336
lines changed
components/Downloads/Release 5 files changed +389
-336
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ import type { FC } from 'react';
9
9
import Button from '#site/components/Common/Button' ;
10
10
import { ReleaseContext } from '#site/providers/releaseProvider' ;
11
11
import {
12
- OperatingSystemLabel ,
13
12
OS_NOT_SUPPORTING_INSTALLERS ,
13
+ OperatingSystemLabel ,
14
14
} from '#site/util/downloadUtils' ;
15
15
import { getNodeDownloadUrl } from '#site/util/getNodeDownloadUrl' ;
16
16
Original file line number Diff line number Diff line change 1
- export type UserOS = 'MAC' | 'WIN' | 'LINUX' | 'AIX' | 'OTHER ';
1
+ import type constants from '../util/downloadUtils/constants.json ';
2
2
3
- export type UserBitness = '64' | '32' ;
3
+ // Extract OS key type from the systems object
4
+ export type UserOS = keyof typeof constants . systems ;
4
5
5
- export type UserArchitecture = 'arm' | 'x86' ;
6
+ // Derive the union type of UserPlatform from the userOptions
7
+ export type UserPlatform = ( typeof constants . userOptions . platforms ) [ number ] ;
6
8
7
- export type UserPlatform =
8
- | 'arm64'
9
- | 'armv7l'
10
- | 'ppc64le'
11
- | 'ppc64'
12
- | 's390x'
13
- | 'ppc64'
14
- | 'x64'
15
- | 'x86' ;
9
+ // Derive the union type of UserBitness from the userOptions
10
+ export type UserBitness = ( typeof constants . userOptions . bitness ) [ number ] ;
11
+
12
+ // Derive the union type of UserArchitecture from the userOptions
13
+ export type UserArchitecture =
14
+ ( typeof constants . userOptions . architecture ) [ number ] ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments