generate() function
export declare function generate(options: GenerateOptions): Promise<Result>;
Parameters
Parameter | Type | Description |
---|---|---|
options | GenerateOptions |
Promise<Result>
Exceptions
GenerateError Thrown if an error occurred.
Thrown if multiple errors occurred.
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.