Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@types/node] Update the definition of
import.meta.resolve(…)
for `…
…node`. This was previously available: - behind a flag, - returning a `Promise`, and - with an optional second `parent` parameter. As of `node` v20.6.0 (https://nodejs.org/en/blog/release/v20.6.0), it is now: - unflagged (with a single param), - synchronous, and - with the `parent` parameter only being supported behind the `--experimental-import-meta-resolve` flag. To minimize the potential of confusion that would come from mixing the unflagged version with flagged parameter, this change only documents the unflagged version. This also matches the API implemented by all browsers, avoiding the potential misunderstandings about the second parameter in codebased with mixed frontend and backend code. Note that there was a bug that sometimes returned a `URL` instead of a `string` in v20.6.0, but this was fixed in v20.8.0 (nodejs/node#49695).
- Loading branch information