mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
18 lines
391 B
TypeScript
18 lines
391 B
TypeScript
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
export function noop(): void {
|
|
/* noop */
|
|
}
|
|
|
|
export async function asyncNoop(): Promise<void> {
|
|
/* noop */
|
|
}
|
|
|
|
export function id<T>(t: T): T {
|
|
return t;
|
|
}
|
|
|
|
export function truthy<T>(t: T | void | undefined | null): t is T {
|
|
return Boolean(t);
|
|
}
|