Skip to content

Commit

Permalink
refactor(util/template): Strict null checks (#14031)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Feb 6, 2022
1 parent 60af784 commit 4fa5eeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/util/template/index.ts
Expand Up @@ -149,9 +149,11 @@ const allowedFieldsList = Object.keys(allowedFields)

type CompileInput = Record<string, unknown>;

function getFilteredObject(input: CompileInput): any {
type FilteredObject = Record<string, CompileInput | CompileInput[] | unknown>;

function getFilteredObject(input: CompileInput): FilteredObject {
const obj = clone(input);
const res = {};
const res: FilteredObject = {};
const allAllowed = [
...Object.keys(allowedFields),
...exposedConfigOptions,
Expand Down
1 change: 0 additions & 1 deletion tsconfig.strict.json
Expand Up @@ -385,7 +385,6 @@
"lib/util/ignore.ts",
"lib/util/merge-confidence/index.ts",
"lib/util/package-rules.ts",
"lib/util/template/index.ts",
"lib/versioning/api.ts",
"lib/versioning/aws-machine-image/index.ts",
"lib/versioning/common.ts",
Expand Down

0 comments on commit 4fa5eeb

Please sign in to comment.