MCPcopy Create free account
hub / github.com/Effect-TS/effect / _rebuild

Method _rebuild

packages/effect/src/SchemaAST.ts:1801–1817  ·  view source on GitHub ↗
(recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined)

Source from the content-addressed store, hash-verified

1799 })
1800 }
1801 private _rebuild(recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) {
1802 const elements = mapOrSame(this.elements, recur)
1803 const rest = mapOrSame(this.rest, recur)
1804 return elements === this.elements && rest === this.rest && checks === this.checks &&
1805 encodingChecks === this.encodingChecks ?
1806 this :
1807 new Arrays(
1808 this.isMutable,
1809 elements,
1810 rest,
1811 this.annotations,
1812 checks,
1813 undefined,
1814 this.context,
1815 encodingChecks
1816 )
1817 }
1818 /** @internal */
1819 recur(recur: (ast: AST) => AST) {
1820 return this._rebuild(recur, this.checks, this.encodingChecks)

Callers 2

recurMethod · 0.95
flipMethod · 0.95

Calls 1

mapOrSameFunction · 0.85

Tested by

no test coverage detected