Path.resolveSync() method
pathlib-ts > Path > resolveSync
Path.resolveSync() method
Section titled “Path.resolveSync() method”Resolve the path synchronously, following symlinks and normalizing.
Signature:
resolveSync(): Path;Returns:
A Path pointing to the resolved location.
Remarks
Section titled “Remarks”Mirrors Path.resolve() but executes synchronously.
Example
Section titled “Example”Normalising a relative workspace path synchronously
import { Path } from "pathlib-ts";
const project = new Path("./docs");console.log(project.resolveSync().toString());