Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
remove ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
WuYifanX committed Oct 27, 2020
1 parent f809a59 commit 6e71d72
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/safeget.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import _ from 'lodash'

export default function safeGet<T, R>(object: T, func: (data: T) => R, defaultValue?: R): R {
let result = defaultValue
try {
Expand All @@ -10,6 +8,5 @@ export default function safeGet<T, R>(object: T, func: (data: T) => R, defaultVa
result = defaultValue
}

// @ts-ignore
return result
return result!
}

0 comments on commit 6e71d72

Please sign in to comment.