Skip to main content
path.PlatformPath.resolve - node__path.d.ts - Node documentation
method path.PlatformPath.resolve

Usage in Deno

```typescript import { type path } from "node:node__path.d.ts"; ```
PlatformPath.resolve(...paths: string[]): string
The right-most parameter is considered {to}. Other parameters are considered an array of {from}. Starting from leftmost {from} parameter, resolves {to} to an absolute path. If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.

Parameters

...paths: string[]

Return Type

string

Throws

TypeError
if any of the arguments is not a string.