[]previous and next page

UsageError

A refused input.

A refused input. The command line prints the message and exits with the usage code.

Import#

ts
import { UsageError } from "create-shadow-app";

Signature#

ts
class UsageError extends Error

Members#

Name Type Description
code readonly code: string The stable code --json prints, such as CREATE_SHADOW_APP_UNKNOWN_OPTION.

Examples#

ts
new UsageError("Unknown option --x.").name; // "UsageError"