1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-14 19:37:59 -05:00
denoland-deno/cli/tests/testdata/check/node_builtin_modules/mod.ts
Bartek Iwańczuk fc2e00152b
feat: support node built-in module imports (#17264)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-24 09:05:54 -05:00

9 lines
386 B
TypeScript

import fs from "node:fs";
const _data = fs.readFileSync("./node_builtin.js", 123);
// check node:module specifically because for deno check it should
// resolve to the @types/node package, but at runtime it uses a different
// builtin object than deno_std
import { builtinModules } from "node:module";
// should error about being string[]
const _testString: number[] = builtinModules;