Skip to content

Commit

Permalink
Add typing
Browse files Browse the repository at this point in the history
  • Loading branch information
samayer12 committed Dec 11, 2024
1 parent 843f70e commit dba5f25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/filter/adjudicators/adjudicators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ export const mismatchedNamespaceRegex = allPass([
// Check if no regex matches
(binding: Binding, kubernetesObject: KubernetesObject) => {
// Convert definedNamespaceRegexes(binding) from string[] to RegExp[]
const regexArray = definedNamespaceRegexes(binding).map(regexStr => new RegExp(regexStr));
const regexArray = definedNamespaceRegexes(binding).map(
(regexStr: string | RegExp): RegExp => new RegExp(regexStr),
);

// Check if no regex matches the namespace of the Kubernetes object
const result = not(any((regEx: RegExp) => regEx.test(carriedNamespace(kubernetesObject)), regexArray));
Expand Down

0 comments on commit dba5f25

Please sign in to comment.