Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion commitlint/fpHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>,
type: NonNullable<any>
) {
if (TypeHelpers.IsNullOrUndefined(variable)) {
throw new Error(
"Invalid 'variable' parameter passed in: null or undefined"
Expand Down
5 changes: 1 addition & 4 deletions docs/WorkflowGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,7 @@
{
return 0;
}
else
{
return 1;
}
return 1;
```

Improved code:
Expand Down