function completionCache
completionCache(session: ReplSession): CompletionCache

Opens a cache over one session's completions, kept between keystrokes and refreshed behind them.

import { completionCache } from './completion.ts';

import type { ReplSession } from '../../repl/session.ts';

// Defined, not invoked: it asks a live page.
function example(session: ReplSession) {
  return completionCache(session).lookup(''); // what is known right now, never a wait
}

Parameters

session: ReplSession

Return Type

Usage

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