Skip to content

Commit

Permalink
refactor: be more specific than any as derived typed
Browse files Browse the repository at this point in the history
ref #3250
  • Loading branch information
shaman-apprentice committed Apr 17, 2023
1 parent 9295318 commit eaef962
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import { metricDataSelector } from "./metricData/metricData.selector"
import { createSelector } from "@ngrx/store"
import { clone } from "../../../util/clone"

const accumulatedDataFallback = Object.freeze({
const accumulatedDataFallback: AccumulatedData = Object.freeze({
unifiedMapNode: undefined,
unifiedFileMeta: undefined
})

export type AccumulatedData = { unifiedMapNode: CodeMapNode; unifiedFileMeta: FileMeta }
export type AccumulatedData = { unifiedMapNode: CodeMapNode | undefined; unifiedFileMeta: FileMeta | undefined }

export const accumulatedDataSelector = createSelector(
metricDataSelector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { hierarchy } from "d3-hierarchy"
import { CodeMapNode } from "../../../codeCharta.model"
import { returnIgnore, transformPath } from "../../../util/codeMapHelper"

export function getNodesByGitignorePath(root: CodeMapNode, gitignorePath: string) {
export function getNodesByGitignorePath(root: CodeMapNode, gitignorePath: string): CodeMapNode[] {
gitignorePath = gitignorePath.trimStart()
if (gitignorePath.length === 0 || !root) {
return []
Expand Down

0 comments on commit eaef962

Please sign in to comment.