UNPKG

@aws-amplify/auth

Version:
16 lines (15 loc) 802 B
import { AuthUserAttributes } from '../../../types'; import { AttributeType } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/types'; /** * Transforms a user attributes object into an array of AttributeType objects. * @param attributes user attributes to be mapped to AttributeType objects. * @returns an array of AttributeType objects. */ export declare function toAttributeType<T extends Record<string, string | undefined>>(attributes: T): AttributeType[]; /** * Transforms an array of AttributeType objects into a user attributes object. * * @param attributes - an array of AttributeType objects. * @returns AuthUserAttributes object. */ export declare function toAuthUserAttribute<T extends string = string>(attributes?: AttributeType[]): AuthUserAttributes<T>;