forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(common): fix batch 7/26 of linter warnings
Changes made: - Fixed lint warnings associated with any-type for truthyness and nonBlankString checking - Fixed lint warnings associated with type-aliases in logger - Fixed lint warnings associated with non-any type in getAllMethodNames and getAllFieldNames - Fixed lint errors associated with unexpected any for private-public keypairs - Added an isRecord user-defined type guard in the common package that can narrow `unknown` types into `Record<string, unknown>` Fixes hyperledger-cacti#1356 Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com> Signed-off-by: akankshadixit <akanksha.dixit12@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information
Showing
6 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/cactus-common/src/main/typescript/types/is-record.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function isRecord(x: unknown): x is Record<string, unknown> { | ||
return !!x && typeof x === "object" && x !== null; | ||
} |