Amplify Toolbox
    Preparing search index...

    Type Alias ResourceAccessAcceptorFactory<RoleIdentifier>

    type ResourceAccessAcceptorFactory<
        RoleIdentifier extends string
        | undefined = undefined,
    > = {
        getResourceAccessAcceptor: (
            ...roleIdentifier: RoleIdentifier extends string
                ? [RoleIdentifier]
                : [],
        ) => ResourceAccessAcceptor;
    }

    Type Parameters

    • RoleIdentifier extends string | undefined = undefined
    Index

    Properties

    getResourceAccessAcceptor: (
        ...roleIdentifier: RoleIdentifier extends string ? [RoleIdentifier] : [],
    ) => ResourceAccessAcceptor

    This type is a little wonky but basically it's saying that if RoleIdentifier is undefined, then this is a function with no props And if RoleIdentifier is a string then this is a function with a single roleIdentifier prop See https://github.com/Microsoft/TypeScript/pull/24897