Skip to content

Commit cc70863

Browse files
committed
Reverts some awkwardness around the re-addition of tsd. Moves the tests into type_tests to avoid needing to place in dist.
1 parent de82443 commit cc70863

File tree

4 files changed

+2
-34
lines changed

4 files changed

+2
-34
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
22
yarn.lock
33
dist
4-
!dist/index.test-d.ts

dist/index.test-d.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"scripts": {
1717
"test": "xo && npm run build && tsd && ava",
18-
"build": "del-cli 'dist/*' '!dist/index.test-d.ts' && tsc",
18+
"build": "del-cli dist && tsc",
1919
"prepack": "npm run build"
2020
},
2121
"main": "dist",
@@ -71,6 +71,6 @@
7171
}
7272
},
7373
"tsd": {
74-
"directory": "tests"
74+
"directory": "type_tests"
7575
}
7676
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {expectType} from 'tsd';
22
import mem = require('../dist');
33

4-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
54
const fn = (_string: string) => true;
65

76
expectType<typeof fn>(mem(fn));
@@ -21,7 +20,6 @@ expectType<typeof fn>(
2120
);
2221

2322
// Testing that the full cache object works with type inference
24-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2523
function objectFnReturnsNumber(_args: {key: string}) {
2624
return 10;
2725
}

0 commit comments

Comments
 (0)