Skip to content

Function: workspaceAt()

Documentation / @wtf/project-resolve / workspace / workspaceAt

function workspaceAt(root, __namedParameters): Promise<Workspace | undefined>;

Defined in: packages/project-resolve/src/workspace.ts:592

The workspace whose root is root: of the pnpm-workspace.yaml there, or of the workspaces of the package.json there; undefined when neither is there. Throws a WorkspaceError of ./errors when one of its files says no workspace, and an UnreadableWorkspaceError when its pnpm-workspace.yaml is there and cannot be read.

Parameters

ParameterType
rootstring
__namedParametersWorkspaceOptions

Returns

Promise<Workspace | undefined>