function find
find(
version?: string,
fetchImpl?: fetch
): Promise<Release>

Fetches the newest release, or the one matching version when pinned.

import * as Release from './release.ts';

// Defined, not invoked: reaches the GitHub API over the network.
async function newest() {
  return (await Release.find()).version; // '0.34.5'
}

Parameters

optional
version: string
optional
fetchImpl: fetch = fetch

Return Type

Promise<Release>

Usage

import { find } from "lib/commands/upgrade/release.ts";