type alias CompleterCallback

What node:repl hands a completer to answer through: the matches, and the word they finish.

import type { CompleterCallback } from './completion.ts';

const answer: CompleterCallback = (_error, [hits]) => hits.length; // ['a'] finishes 'a'

Definition

(
error: null,
result: [string[], string]
) => void

Usage

import { type CompleterCallback } from "lib/commands/repl/completion.ts";