The following declaration file is missing an import so that it resolves the URL type in the following line, when using your package to run an application in Node.js:
|
export function parseFile(path: string | Buffer | URL | number, encoding?: string): Promise<Properties> { |
I get the following error when trying to compile my application using yarn:
error TS2304: Cannot find name 'URL'
Entering import { URL } from 'url' in node-java-props.d.ts solved the issue for me.