Skip to content

Commit

Permalink
chore: prefer 'as const' syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Oct 4, 2024
1 parent 96db099 commit 357a467
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crawlfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function crawl(dir: string, options: IOptions) {
const metadata: Record<string, CrawledFileType> = {};
const crawled = await glob(dir, options);
const results = await Promise.all(
crawled.map(async (filename) => <const>[filename, await determineFileType(filename)]),
crawled.map(async (filename) => [filename, await determineFileType(filename)] as const),
);
const links: string[] = [];
const filenames = results
Expand All @@ -51,5 +51,5 @@ export async function crawl(dir: string, options: IOptions) {
return !filename.startsWith(link);
});
});
return <const>[filenames, metadata];
return [filenames, metadata] as const;
}

0 comments on commit 357a467

Please sign in to comment.