# @types/resolve-path

> TypeScript definitions for resolve-path

Latest version **1.4.3** (published 2024-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/resolve-path
pnpm add @types/resolve-path
yarn add @types/resolve-path
bun add @types/resolve-path
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.4.3 |
| Published | 2024-10-07 |
| First published | 2020-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/resolve-path
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve-path
- npm.io page: https://npm.io/package/@types/resolve-path

## Recent versions

- 1.4.3 (latest) — 2024-10-07
- 1.4.2 (ts4.7) — 2023-11-07
- 1.4.0 (ts3.4) — 2020-09-30
- 1.4.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/resolve-path`

# Summary
This package contains type definitions for resolve-path (https://github.com/pillarjs/resolve-path#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve-path.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve-path/index.d.ts)
````ts
/**
 * Resolve a relative path against `process.cwd()` (the process's current working directory) and return an absolute path.
 * *This will throw* if the resulting resolution seems malicious. The following are malicious:
 *
 *  * The relative path is an absolute path
 *  * The relative path contains a NULL byte
 *  * The relative path resolves to a path outside of process.cwd()
 *  * The relative path traverses above process.cwd() and back down
 */
declare function resolvePath(relativePath: string): string;

/**
 * Resolve a relative path against the provided root path and return an absolute path.
 * *This will throw* if the resulting resolution seems malicious. The following are malicious:
 *
 *  * The relative path is an absolute path
 *  * The relative path contains a NULL byte
 *  * The relative path resolves to a path outside of the root path
 *  * The relative path traverses above the root and back down
 */
// tslint:disable-next-line unified-signatures
declare function resolvePath(rootPath: string, relativePath: string): string;

export = resolvePath;

````

### Additional Details
 * Last updated: Mon, 07 Oct 2024 22:38:10 GMT
 * Dependencies: none

# Credits
These definitions were written by .

---
_Source: https://npm.io/package/@types/resolve-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
