test(core): fix layer node replacement type expectation (#34386)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Aiden Cline
opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
parent
846d548154
commit
fb59606bb4
@@ -69,10 +69,10 @@ void invalidNodeReplacement
|
|||||||
// @ts-expect-error Replacement cannot introduce a new error
|
// @ts-expect-error Replacement cannot introduce a new error
|
||||||
LayerNode.compile(a, [[a, Layer.effect(A, Effect.fail(new OtherError()))]])
|
LayerNode.compile(a, [[a, Layer.effect(A, Effect.fail(new OtherError()))]])
|
||||||
|
|
||||||
|
const nodeReplacementWithError = make({ service: A, layer: Layer.effect(A, Effect.fail(new OtherError())), deps: [] })
|
||||||
|
|
||||||
// @ts-expect-error Node replacement cannot introduce a new error
|
// @ts-expect-error Node replacement cannot introduce a new error
|
||||||
const invalidNodeErrorReplacement = () =>
|
LayerNode.compile(a, [[a, nodeReplacementWithError]])
|
||||||
LayerNode.compile(a, [[a, make({ service: A, layer: Layer.effect(A, Effect.fail(new OtherError())), deps: [] })]])
|
|
||||||
void invalidNodeErrorReplacement
|
|
||||||
|
|
||||||
class TagA extends Context.Service<TagA, {}>()("test/TagA") {}
|
class TagA extends Context.Service<TagA, {}>()("test/TagA") {}
|
||||||
class TagB extends Context.Service<TagB, {}>()("test/TagB") {}
|
class TagB extends Context.Service<TagB, {}>()("test/TagB") {}
|
||||||
|
|||||||
Reference in New Issue
Block a user