What is the most efficient method for typing the content of the "package.json" file in TypeScript?
import { promises as fs } from 'fs';
export function loadManifest(): Promise<any> {
const manifestPath = `${PROJECT_DIR}/package.json`;
return fs.readFile(manifestPath, { encoding: 'utf-8' });
}
In the code snippet above, I am currently using Promise<any>
as the return type. However, I am curious if there are any alternative approaches or packages available that I may not be aware of.