Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/cli/js/lib.deno.ns.d.ts>Deno.args

A modern runtime for JavaScript and TypeScript.
Go to Latest
variable Deno.args
import { Deno } from "https://deno.land/x/deno@v1.0.0/cli/js/lib.deno.ns.d.ts";
const { args } = Deno;

Returns the script arguments to the program. If for example we run a program:

 deno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd

Then Deno.args will contain:

 [ "/etc/passwd" ]

type

string[]