Skip to main content

publicgenerate

Callable


  • Finds components with glob patterns in the specified path and returns exported values from each components.

    @remarks

    Extension names is optional in options.components because it's appended automatically. (e.g. foo => foo?(.{js,json}))

    Extensions are from require.extensions. You can require ts-node/register to add support for .ts extension.

    Note that this function currently is only available on Node.js.

    @throws

    GenerateError Thrown if an error occurred.

    @throws

    ResolveError Propagated from resolve function.

    @throws

    AggregateError Thrown if multiple errors occurred.

    @see

    Parameters

    Returns Promise<Result>