diff --git a/commitlint/fpHelpers.ts b/commitlint/fpHelpers.ts index 3b7de9c5..74fc3bce 100644 --- a/commitlint/fpHelpers.ts +++ b/commitlint/fpHelpers.ts @@ -56,7 +56,10 @@ export class TypeHelpers { } // because instanceof doesn't work with primitive types (e.g. String), taken from https://stackoverflow.com/a/58184883/544947 - public static IsInstanceOf(variable: any, type: any) { + public static IsInstanceOf( + variable: NonNullable, + type: NonNullable + ) { if (TypeHelpers.IsNullOrUndefined(variable)) { throw new Error( "Invalid 'variable' parameter passed in: null or undefined" diff --git a/docs/WorkflowGuidelines.md b/docs/WorkflowGuidelines.md index a5f2f35f..df2564cb 100644 --- a/docs/WorkflowGuidelines.md +++ b/docs/WorkflowGuidelines.md @@ -192,10 +192,7 @@ { return 0; } - else - { - return 1; - } + return 1; ``` Improved code: