Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function resolve(id: string) {
return trimRoot(
__resolve(id, {
basedir: __dirname,
readFileSync: (path: string) => __file.read(trimRoot(path)),
isFile: (path: string) => __file.exists(trimRoot(path))
})
);
}