mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-19 09:37:43 +02:00
refactor: reduce number of leaked anys (#7465)
This commit is contained in:
parent
6e62bba30f
commit
89b0fff128
39 changed files with 121 additions and 89 deletions
|
@ -28,7 +28,11 @@ type PackageJsonFile = {
|
|||
async function getPackagesJsonFiles(): Promise<PackageJsonFile[]> {
|
||||
const files = await Globby('packages/*/package.json');
|
||||
return Promise.all(
|
||||
files.map((file) => fs.readJSON(file).then((content) => ({file, content}))),
|
||||
files.map((file) =>
|
||||
fs
|
||||
.readJSON(file)
|
||||
.then((content: PackageJsonFile['content']) => ({file, content})),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue