Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 7726c0b

Browse files
committed
The callback may be undefined
1 parent 68b47c2 commit 7726c0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ type CallbackFunction = (error?: Error, update?: ReleaseDescriptor | TagDescript
9393

9494
type RestHandlerFunction = (res: IncomingMessage) => void
9595

96-
export default function check(options: CheckOptions, callback: CallbackFunction): null | Promise<ReleaseDescriptor | TagDescriptor>
96+
export default function check(options: CheckOptions, callback?: CallbackFunction): null | Promise<ReleaseDescriptor | TagDescriptor>
9797
export = check

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const check = require('./check')
55
* The exported checking function.
66
*
77
* @param {CheckOptions} options The options for the version check.
8-
* @param {CallbackFunction} callback An optional callback to pass the result to.
9-
* Can be omitted to return a Promise.
8+
* @param {CallbackFunction|undefined} callback An optional callback to pass the result to.
9+
* Can be omitted to return a Promise.
1010
* @return null or a Promise.
1111
*/
1212
module.exports = (options, callback) => {

0 commit comments

Comments
 (0)