Skip to content

Variable: path ​

ts
const 
path
: (
opts
) =>
Promise
<string | typeof CANCEL_SYMBOL>;

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

The path prompt extends autocomplete to provide file and directory suggestions.

Parameters ​

ParameterType

opts

PathOptions

Returns ​

Promise<string | typeof CANCEL_SYMBOL>

See ​

https://bomb.sh/docs/clack/packages/prompts/#path-selection

Example ​

ts
import { 
path
} from "@clack/prompts";
const
result
= await
path
({
message
: "Select a file:",
root
: process.cwd(),
directory
: false,
});

Released under the MIT License