purity-ambient-apis.ts 218 B

12345
  1. // Compile-time purity: ambient Node and web APIs do not exist in the script world.
  2. process.exit(1); // error
  3. await fetch("https://example.com"); // error
  4. require("node:fs"); // error
  5. await import("node:fs"); // error