Skip to content

Commit

Permalink
Fix dtslint setup in @emotion/memoize
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jul 13, 2021
1 parent c31cc38 commit 40741ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/memoize/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default function memoize<V>(fn: (arg: string) => V): (arg: string) => V {
const cache = Object.create(null)
const cache: Record<string, V> = Object.create(null)

return (arg: string) => {
if (cache[arg] === undefined) cache[arg] = fn(arg)
Expand Down
1 change: 1 addition & 0 deletions packages/memoize/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../src'
2 changes: 1 addition & 1 deletion packages/memoize/types/tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import memoize from '@emotion/memoize'
import memoize from '../src'

// $ExpectType string[]
memoize((arg: string) => [arg])('foo')
Expand Down
3 changes: 2 additions & 1 deletion packages/memoize/types/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],

"no-unnecessary-generics": false,
"strict-export-declare-modifiers": false
"strict-export-declare-modifiers": false,
"no-default-import": false
}
}

0 comments on commit 40741ec

Please sign in to comment.