Skip to content

Commit

Permalink
refactor(type): fix typescript lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Army-U committed Jan 16, 2019
1 parent d1b4cd2 commit 3ecb71e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ export default function cache (fn: (str: any) => any): (str: any) => any {
return function cachedFn (this: any) {
const str = arguments[0]
const hit = cache[str]
return cache.hasOwnProperty(str) ? hit : (cache[str] = fn.apply(this, arguments))
return cache.hasOwnProperty(str) ? hit : (cache[str] = fn.apply(this, arguments as any))
}
}
2 changes: 1 addition & 1 deletion src/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* window.addEventListener('resize', debounce(function () { console.log(this) }, 100))
*/
export default function debounce (
func: () => void,
func: (...args: any[]) => void,
wait: number = 50
): (...args: any[]) => void {
let timer: any = null
Expand Down

0 comments on commit 3ecb71e

Please sign in to comment.