forked from mtusi2026/mtusi2026lab7
20 lines
419 B
TypeScript
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);
|
|
}
|