method TaskClass.ignore
Private
TaskClass.ignore<T>(
source: PromiseLike<T> | (() => T | PromiseLike<T>),
reason: string
): TaskClass<T | undefined, never>

One-shot static spelling of TaskClass#ignore for a foreign promise or recipe — the fire-and-forget cleanup idiom in a single call. (The one twin whose first argument is a raw PromiseLike or recipe rather than a Task: ignore is a terminal verb usable without ever holding a Task.)

import { unlink } from 'node:fs/promises';

Task.ignore(unlink('/tmp/qunitx-daemon.sock'), 'daemon socket unlink');

Type Parameters

Parameters

source: PromiseLike<T> | (() => T | PromiseLike<T>)
reason: string

Return Type

TaskClass<T | undefined, never>

Usage

import { TaskClass } from "lib/task/task.ts";