Skip to content

Commit 357a467

Browse files
committed
chore: prefer 'as const' syntax
1 parent 96db099 commit 357a467

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crawlfs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function crawl(dir: string, options: IOptions) {
3131
const metadata: Record<string, CrawledFileType> = {};
3232
const crawled = await glob(dir, options);
3333
const results = await Promise.all(
34-
crawled.map(async (filename) => <const>[filename, await determineFileType(filename)]),
34+
crawled.map(async (filename) => [filename, await determineFileType(filename)] as const),
3535
);
3636
const links: string[] = [];
3737
const filenames = results
@@ -51,5 +51,5 @@ export async function crawl(dir: string, options: IOptions) {
5151
return !filename.startsWith(link);
5252
});
5353
});
54-
return <const>[filenames, metadata];
54+
return [filenames, metadata] as const;
5555
}

0 commit comments

Comments
 (0)