Skip to content

Path.resolveSync() method

pathlib-ts > Path > resolveSync

Resolve the path synchronously, following symlinks and normalizing.

Signature:

resolveSync(): Path;

Returns:

Path

A Path pointing to the resolved location.

Mirrors Path.resolve() but executes synchronously.

Normalising a relative workspace path synchronously

import { Path } from "pathlib-ts";
const project = new Path("./docs");
console.log(project.resolveSync().toString());