Skip to content

Function: createFsWriteGuardBuilder() ​

ts
function createFsWriteGuardBuilder(options): FsWriteGuardNode;

Defined in: fs/src/builders/create-fs-write-guard-builder.ts:30

Compiles a passive FsWriteGuardNode (fs:write-guard) for fs.writeGuard(options).

Rejects write effects matching options.denyGlobs unless exempted by options.allowGlobs or an active LeaseDelta, optionally scoping denials to files existing at baseRef.

Parameters ​

ParameterTypeDescription
optionsFsWriteGuardOptionsWrite guard deny/allow glob and baseRef options.

Returns ​

FsWriteGuardNode

Deeply frozen FsWriteGuardNode AST descriptor.

Throws ​

If options.denyGlobs is empty.

Released under the MIT License.