( _: nodeImplementationInputOf<d> )
| 381 | } |
| 382 | |
| 383 | export const implementNode = <d extends BaseNodeDeclaration = never>( |
| 384 | _: nodeImplementationInputOf<d> |
| 385 | ): nodeImplementationOf<d> => { |
| 386 | const implementation: UnknownNodeImplementation = _ as never |
| 387 | if (implementation.ownErr) { |
| 388 | Object.assign( |
| 389 | implementation.defaults, |
| 390 | errorWriters, |
| 391 | errorWritersByCode[implementation.kind as never] |
| 392 | ) |
| 393 | implementation.defaults.expected ??= ctx => |
| 394 | "description" in ctx ? |
| 395 | (ctx.description as string) |
| 396 | : implementation.defaults.description(ctx as never) |
| 397 | } |
| 398 | return implementation as never |
| 399 | } |
no outgoing calls
no test coverage detected