Skip to content

Commit 05cf81a

Browse files
authored
fix: add missing parameter for type of build function in fastify-cli/helper (#724)
* fix: add missing parameter for type of build in helper * fix: make build options parameters optional
1 parent 83c9ca2 commit 05cf81a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ There are two utilities provided:
346346
- `build`: builds your application and returns the `fastify` instance without calling the `listen` method.
347347
- `listen`: starts your application and returns the `fastify` instance listening on the configured port.
348348

349-
Both of these utilities have the `function(arg, pluginOptions, serverOptions)` parameters:
349+
Both of these utilities have the `function(args, pluginOptions, serverOptions)` parameters:
350350

351-
- `cliArgs`: is a string or a string array within the same arguments passed to the `fastify-cli` command.
351+
- `args`: is a string or a string array within the same arguments passed to the `fastify-cli` command.
352352
- `pluginOptions`: is an object containing the options provided to the started plugin (eg: `app.js`).
353353
- `serverOptions`: is an object containing the additional options provided to fastify server, similar to the `--options` command line argument
354354

helper.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fastify from 'fastify'
22

33
declare module 'fastify-cli/helper.js' {
44
module helper {
5-
export function build(argv: Array<string>, config: Object): ReturnType<typeof fastify>;
5+
export function build(args: Array<string>, additionalOptions?: Object, serverOptions?: Object): ReturnType<typeof fastify>;
66
}
77

88
export = helper;

0 commit comments

Comments
 (0)