1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 13:10:17 +00:00

document derived exports

This commit is contained in:
✨ Audrey ✨
2025-04-21 13:05:12 -04:00
parent 3bb5614e16
commit 5749e4191d

View File

@@ -10,13 +10,25 @@ import password from "./password/random-password";
import { CredentialType, CredentialAlgorithm } from "./type";
import effWordList from "./username/eff-word-list";
export const BuiltIn = {
/** Credential generators hosted natively by the credential generator system.
* These are supplemented by generators from the {@link ExtensionService}.
*/
export const BuiltIn = Object.freeze({
/** Catchall email address generator */
catchall,
/** plus-addressed email address generator */
plusAddress,
/** passphrase generator using the EFF word list */
passphrase,
/** password generator */
password,
/** username generator using the EFF word list */
effWordList,
};
});
// `CredentialAlgorithm` is defined in terms of `ABT`; supplying
// type information in the barrel file breaks a circular dependency.
@@ -25,9 +37,17 @@ export const AlgorithmsByType: Record<
CredentialType,
ReadonlyArray<CredentialAlgorithm>
> = AlgorithmsByTypeData;
/** A list of all built-in algorithm identifiers
* @remarks this is useful when you need to filter invalid values
*/
export const Algorithms: ReadonlyArray<CredentialAlgorithm> = Object.freeze(
Object.values(AlgorithmData),
);
/** A list of all built-in algorithm types
* @remarks this is useful when you need to filter invalid values
*/
export const Types: ReadonlyArray<CredentialType> = Object.freeze(Object.values(TypeData));
export { Profile, Type, Algorithm } from "./data";