twoslash-rust 0.0.1

Twoslash for Rust - extract type information from Rust code using rust-analyzer
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env node
import { spawn } from 'node:child_process'
import { getBinaryPath } from './dist/index.js'

const binary = getBinaryPath()
const child = spawn(binary, process.argv.slice(2), {
  stdio: 'inherit',
})

child.on('exit', (code) => {
  process.exit(code ?? 0)
})