8000 Bump `tsd-check` dev dependency Β· sindresorhus/write-json-file@b2cb702 Β· GitHub
[go: up one dir, main page]

Skip to content

Commit b2cb702

Browse files
committed
Bump tsd-check dev dependency
1 parent f96fdd0 commit b2cb702

File tree

2 files changed

+44
-46
lines changed

2 files changed

+44
-46
lines changed

β€Žindex.test-d.ts

Lines changed: 43 additions & 45 deletions
BBC4
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,50 @@
11
import {expectType} from 'tsd-check';
22
import writeJsonFile, {sync, Replacer, SortKeys, JSONStringifyable} from '.';
33

4-
(async () => {
5-
expectType<JSONStringifyable>('πŸ¦„');
6-
expectType<JSONStringifyable>(1);
7-
expectType<JSONStringifyable>(true);
8-
expectType<JSONStringifyable>(new Date());
9-
expectType<JSONStringifyable>(['hello', 'world']);
10-
expectType<JSONStringifyable>({unicorn: 'πŸ¦„'});
4+
expectType<JSONStringifyable>('πŸ¦„');
5+
expectType<JSONStringifyable>(1);
6+
expectType<JSONStringifyable>(true);
7+
expectType<JSONStringifyable>(new Date());
8+
expectType<JSONStringifyable>(['hello', 'world']);
9+
expectType<JSONStringifyable>({unicorn: 'πŸ¦„'});
1110

12-
expectType<SortKeys>(() => 1);
13-
expectType<SortKeys>((a: string) => a.length);
14-
expectType<SortKeys>((a: string, b: string) => a.length - b.length);
11+
expectType<SortKeys>(() => 1);
12+
expectType<SortKeys>((a: string) => a.length);
13+
expectType<SortKeys>((a: string, b: string) => a.length - b.length);
1514

16-
expectType<Replacer>(() => 1);
17-
expectType<Replacer>(() => 'unicorn');
18-
expectType<Replacer>(() => true);
19-
expectType<Replacer>(() => null);
20-
expectType<Replacer>(() => undefined);
21-
expectType<Replacer>(() => ({unicorn: 'πŸ¦„'}));
22-
expectType<Replacer>(() => ['unicorn', 1]);
23-
expectType<Replacer>(() => () => 'foo');
24-
expectType<Replacer>((key: string) => key.toUpperCase());
25-
expectType<Replacer>((key: string, value: string) => (key + value).toUpperCase());
15+
expectType<Replacer>(() => 1);
16+
expectType<Replacer>(() => 'unicorn');
17+
expectType<Replacer>(() => true);
18+
expectType<Replacer>(() => null);
19+
expectType<Replacer>(() => undefined);
20+
expectType<Replacer>(() => ({unicorn: 'πŸ¦„'}));
21+
expectType<Replacer>(() => ['unicorn', 1]);
22+
expectType<Replacer>(() => () => 'foo');
23+
expectType<Replacer>((key: string) => key.toUpperCase());
24+
expectType<Replacer>((key: string, value: string) => (key + value).toUpperCase());
2625

27-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}));
28-
expectType<void>(await writeJsonFile('unicorn.json', 'πŸ¦„'));
29-
expectType<void>(await writeJsonFile('date.json', new Date()));
30-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {detectIndent: true}));
31-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: ' '}));
32-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: 4}));
33-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {mode: 0o666}));
34-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: ['unicorn', 1]}));
35-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: () => 'unicorn'}));
36-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: () => -1}));
37-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: (a: string, b: string) => a.length - b.length}));
38-
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: true}));
26+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}));
27+
expectType<void>(await writeJsonFile('unicorn.json', 'πŸ¦„'));
28+
expectType<void>(await writeJsonFile('date.json', new Date()));
29+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {detectIndent: true}));
30+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: ' '}));
31+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: 4}));
32+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {mode: 0o666}));
33+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: ['unicorn', 1]}));
34+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: () => 'unicorn'}));
35+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: () => -1}));
36+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: (a: string, b: string) => a.length - b.length}));
37+
expectType<void>(await writeJsonFile('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: true}));
3938

40-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}));
41-
expectType<void>(sync('unicorn.json', 'πŸ¦„'));
42-
expectType<void>(sync('date.json', new Date()));
43-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {detectIndent: true}));
44-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: ' '}));
45-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: 4}));
46-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {mode: 0o666}));
47-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: ['unicorn', 1]}));
48-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: () => 'unicorn'}));
49-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: () => -1}));
50-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: (a: string, b: string) => a.length - b.length}));
51-
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: true}));
52-
})();
39+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}));
40+
expectType<void>(sync('unicorn.json', 'πŸ¦„'));
41+
expectType<void>(sync('date.json', new Date()));
42+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {detectIndent: true}));
43+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: ' '}));
44+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {indent: 4}));
45+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {mode: 0o666}));
46+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: ['unicorn', 1]}));
47+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {replacer: () => 'unicorn'}));
48+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: () => -1}));
49+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: (a: string, b: string) => a.length - b.length}));
50+
expectType<void>(sync('unicorn.json', {unicorn: 'πŸ¦„'}, {sortKeys: true}));

β€Žpackage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"devDependencies": {
4545
"ava": "*",
4646
"tempfile": "^2.0.0",
47-
"tsd-check": "^0.1.0",
47+
"tsd-check": "^0.2.1",
4848
"xo": "*"
4949
}
5050
}

0 commit comments

Comments
Β (0)
0