Skip to main content
Module

x/deploy/src/subcommands/types.ts

Command line tool for Deno Deploy
Go to Latest
File
// Copyright 2021 Deno Land Inc. All rights reserved. MIT license.
import { error } from "../error.ts";import { downloadTypes } from "../utils/types.ts";
const help = `deployctl typesPrint runtime TypeScript declarations.deployctl types > deployctl.d.ts
The declaration file could be saved and used for typing information.
USAGE: deployctl types [OPTIONS]
OPTIONS: -h, --help Prints help information`;
export interface Args { help: boolean;}
// deno-lint-ignore no-explicit-anyexport default async function (rawArgs: Record<string, any>): Promise<void> { const args: Args = { help: !!rawArgs.help, }; if (args.help) { console.log(help); Deno.exit(0); } if (rawArgs._.length > 0) { console.error(help); error("Too many positional arguments given."); }
const types = await downloadTypes(); console.log(types);}