Skip to content

Variable: cancel ​

ts
const 
cancel
: (
message
?,
opts
?) => void;

Defined in: node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:628

The cancel function defines an interruption of an interaction and therefore its end.

Parameters ​

ParameterTypeDescription

message?

string

‐

opts?

CommonOptions

Additional configuration options.

Returns ​

void

See ​

https://bomb.sh/docs/clack/packages/prompts/#cancel

Example ​

ts
import { 
cancel
} from "@clack/prompts";
import
process
from "node:process";
cancel
("Installation canceled");
process
.exit(1);

基于 MIT 许可证发布