File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ /** @typedef {import('./types.js').OsString } OsString */
4
+ /** @typedef {import('./types.js').LibcString } LibcString */
5
+ /** @typedef {import('./types.js').ArchString } ArchString */
6
+ /** @typedef {import('./types.js').TargetTriplet } TargetTriplet */
7
+
3
8
var HostTargets = module . exports ;
4
9
5
10
let reVersionOnly = / ^ [ \d \. ] + ( - R E L E A S E ) ? $ / ;
@@ -112,6 +117,9 @@ HostTargets._MATCHERS = {
112
117
mingw : / ^ M I N G W ( 6 4 _ N T ) ? / ,
113
118
} ;
114
119
120
+ /**
121
+ * @param {Object.<"os"|"arch"|"libc", String> } target
122
+ */
115
123
HostTargets . termsToTarget = function ( target , terms ) {
116
124
let bogoTerms = [ ] ;
117
125
Original file line number Diff line number Diff line change 9
9
* @prop {Array<String> } TERMS_EXTS_SOURCE
10
10
*/
11
11
12
+ /** @typedef {import('./types.js').OsString } OsString */
13
+ /** @typedef {import('./types.js').LibcString } LibcString */
14
+ /** @typedef {import('./types.js').ArchString } ArchString */
15
+ /** @typedef {import('./types.js').TargetTriplet } TargetTriplet */
16
+
12
17
/** @type {Triplet } */
13
18
//@ts -ignore
14
19
var Triplet = ( 'object' === typeof module && exports ) || { } ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ module . exports . _types = true ;
4
+
5
+ /**
6
+ * @typedef {""|"ANYOS"|"posix_2017"|"aix"|"android"|"darwin"|"dragonfly"|"freebsd"|"illumos"|"linux"|"netbsd"|"openbsd"|"plan9"|"solaris"|"sunos"|"wasi"|"windows" } OsString
7
+ */
8
+
9
+ /**
10
+ * @typedef {""|"ANYLIBC"|"none"|"bionic"|"gnu"|"libc"|"msvc"|"musl" } LibcString
11
+ */
12
+
13
+ /**
14
+ * @typedef {""|"ANYARCH"|"POSIX"|"aarch64"|"armel"|"armhf"|"armv6"|"armv7"|"armv7a"|"loong64"|"mips"|"mips64"|"mips64el"|"mips64r6"|"mips64r6el"|"mipsel"|"mipsr6"|"mipsr6el"|"ppc"|"ppc64"|"ppc64le"|"riscv64"|"s390x"|"wasm32"|"x86"|"x86_64"|"x86_64_v2"|"x86_64_v3" } ArchString
15
+ */
16
+
17
+ /**
18
+ * @typedef {""|"ANYVENDOR"|"apple"|"pc"|"unknown" } VendorString
19
+ */
20
+
21
+ /**
22
+ * @typedef TargetTriplet
23
+ * @prop {OsString } os
24
+ * @prop {ArchString } arch
25
+ * @prop {LibcString } libc
26
+ * @prop {VendorString } [vendor]
27
+ * @prop {Boolean } [android] - for intermediary representation
28
+ */
You can’t perform that action at this time.
0 commit comments