mirror of
https://github.com/bitwarden/browser
synced 2026-02-09 13:10:17 +00:00
add missing docs
This commit is contained in:
@@ -20,10 +20,14 @@ export function deepFreeze<T extends object>(value: T): Readonly<T> {
|
||||
return Object.freeze(value);
|
||||
}
|
||||
|
||||
/** Type guard that returns `true` when the value is an i18n key. */
|
||||
export function isI18nKey(value: I18nKeyOrLiteral): value is string {
|
||||
return typeof value === "string";
|
||||
}
|
||||
|
||||
export function isLiteral(value: I18nKeyOrLiteral): value is string {
|
||||
/** Type guard that returns `true` when the value requires no translation.
|
||||
* @remarks the literal value can be accessed using the `.literal` property.
|
||||
*/
|
||||
export function isLiteral(value: I18nKeyOrLiteral): value is { literal: string } {
|
||||
return typeof value === "object" && "literal" in value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user