File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11export {
2+ SUPPORTED_TRIPLETS ,
23 ANDROID_TRIPLETS ,
34 APPLE_TRIPLETS ,
4- SUPPORTED_TRIPLETS ,
5+ type SupportedTriplet ,
56 type AndroidTriplet ,
67 type AppleTriplet ,
7- type SupportedTriplet ,
8+ isSupportedTriplet ,
89 isAppleTriplet ,
910 isAndroidTriplet ,
1011} from "./prebuilds/triplets.js" ;
Original file line number Diff line number Diff line change @@ -32,14 +32,20 @@ export const SUPPORTED_TRIPLETS = [
3232
3333export type SupportedTriplet = ( typeof SUPPORTED_TRIPLETS ) [ number ] ;
3434
35+ export function isSupportedTriplet (
36+ triplet : unknown
37+ ) : triplet is SupportedTriplet {
38+ return ( SUPPORTED_TRIPLETS as readonly unknown [ ] ) . includes ( triplet ) ;
39+ }
40+
3541export function isAndroidTriplet (
3642 triplet : SupportedTriplet
3743) : triplet is AndroidTriplet {
38- return ANDROID_TRIPLETS . includes ( triplet as AndroidTriplet ) ;
44+ return ( ANDROID_TRIPLETS as readonly unknown [ ] ) . includes ( triplet ) ;
3945}
4046
4147export function isAppleTriplet (
4248 triplet : SupportedTriplet
4349) : triplet is AppleTriplet {
44- return APPLE_TRIPLETS . includes ( triplet as AppleTriplet ) ;
50+ return ( APPLE_TRIPLETS as readonly unknown [ ] ) . includes ( triplet ) ;
4551}
You can’t perform that action at this time.
0 commit comments