anki/ts/lib/functional.ts
Henrik Giesel c7f3bae738
Last polishes for Surrounder class (#2017)
* Make private properties in Surrounder truly private

* Fix remove logic of Surrounder

* No reason for toggleTriggerRemove to be async

* Allow using alt-shift to set all remove formats but this one

* modifyFormat => updateFormat

* Fix formatting
2022-08-17 16:00:37 +10:00

19 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);
}