Files
mtusi2026lab7/scripts/install-dev-types.ts

20 lines
419 B
TypeScript

import { run, root, safeFailure } from "./runtime";
try {
await run([
process.execPath,
"add",
"--dev",
"--ignore-scripts",
"@types/bun",
]);
const pkg = await Bun.file(root + "/package.json").json();
console.log(
JSON.stringify({
installed: "development type declarations only",
types_bun: pkg.devDependencies?.["@types/bun"],
}),
);
} catch (e) {
safeFailure(e);
}