FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ops-codegraph-tool/scripts/node-ts.js at main · optave/ops-codegraph-tool · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
optave
/
ops-codegraph-tool
Public
Notifications
You must be signed in to change notification settings
Fork
23
Star
92
Code
Issues
69
Pull requests
5
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ops-codegraph-tool
/
scripts
/
node-ts.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (21 loc) · 721 Bytes
Breadcrumbs
ops-codegraph-tool
/
scripts
/
node-ts.js
Copy path
File metadata and controls
25 lines (21 loc) · 721 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env node
// node-ts.js — TypeScript launcher
// Uses --experimental-strip-types, which is accepted on every supported Node
// version (>=22.6). Node 23 briefly shipped a --strip-types alias that was
// removed in Node 24, so we avoid it.
// Usage: node scripts/node-ts.js <script.ts> [args...]
import
{
execFileSync
}
from
"node:child_process"
;
const
flag
=
"--experimental-strip-types"
;
const
[
script
,
...
args
]
=
process
.
argv
.
slice
(
2
)
;
if
(
!
script
)
{
console
.
error
(
"Usage: node scripts/node-ts.js <script.ts> [args...]"
)
;
process
.
exit
(
1
)
;
}
try
{
execFileSync
(
process
.
execPath
,
[
flag
,
script
,
...
args
]
,
{
stdio
:
"inherit"
,
env
:
process
.
env
,
}
)
;
}
catch
(
err
)
{
process
.
exit
(
err
.
status
??
1
)
;
}
Back
|
FazBrowse Home
|
New Git URL