Skip to content

Commit

Permalink
[rules] RuleBuilder: Mark fn for then(fn) as optional (#359)
Browse files Browse the repository at this point in the history
This fixes wrong JSDoc.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Jul 10, 2024
1 parent 8ee0b91 commit 9ad5b28
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/rules/condition-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ConditionBuilder {
/**
* Move to the rule operations
*
* @param {*} fn the optional function to execute
* @param {*} [fn] the optional function to execute
* @returns {operations.OperationBuilder}
*/
then (fn) {
Expand Down Expand Up @@ -60,7 +60,7 @@ class ConditionConf {

/**
*
* @param {*} fn an optional function
* @param {*} [fn] an optional function
* @returns ConditionBuilder
*/
then (fn) {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/trigger-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class TriggerConf {
/**
* Move to the rule operations
*
* @param {*} fn the optional function to execute
* @param {*} [fn] the optional function to execute
* @returns {operations.OperationBuilder}
*/
then (fn) {
Expand Down
4 changes: 2 additions & 2 deletions types/rules/condition-builder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export class ConditionBuilder {
/**
* Move to the rule operations
*
* @param {*} fn the optional function to execute
* @param {*} [fn] the optional function to execute
* @returns {operations.OperationBuilder}
*/
then(fn: any): operations.OperationBuilder;
then(fn?: any): operations.OperationBuilder;
/**
* Condition of an item in determining whether to process rule.
*
Expand Down
2 changes: 1 addition & 1 deletion types/rules/condition-builder.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions types/rules/trigger-builder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ declare class TriggerConf {
/**
* Move to the rule operations
*
* @param {*} fn the optional function to execute
* @param {*} [fn] the optional function to execute
* @returns {operations.OperationBuilder}
*/
then(fn: any): operations.OperationBuilder;
then(fn?: any): operations.OperationBuilder;
/**
* Move to the rule condition
*
Expand Down
2 changes: 1 addition & 1 deletion types/rules/trigger-builder.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ad5b28

Please sign in to comment.