This should be used in conjunction with eslint rules such as @typescript-eslint/no-misused-promises
to explicitly ignore a promise returned by a callback.
@example
constdoSomething=()=>'foo';// string constdoSomethingIgnore=()=>ignore(doSomething());// undefined as void constdoAsync=async()=>'foo';// Promise<string> constdoSyncIgnore=()=>ignore(doAsync());// undefined as void
Always return
undefined
and ignore passed value.This should be used in conjunction with eslint rules such as @typescript-eslint/no-misused-promises to explicitly ignore a promise returned by a callback.