[I] DiagnosticCollector
Helper object to collect diagnostics from function following the diagnostics accessor pattern(foo() => [T, Diagnostic[]])
Properties
Property | Modifier | Type |
---|---|---|
diagnostics | readonly | readonly Diagnostic [] |
Methods
add()
Add a diagnostic to the collection
Parameters
Parameter | Type | Description |
---|---|---|
diagnostic | Diagnostic | Diagnostic to add. |
Returns
void
pipe()
Unwrap the Diagnostic result, add all the diagnostics and return the data.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
result | DiagnosticResult <T > | Accessor diagnostic result |
Returns
T
wrap()
Wrap the given value in a tuple including the diagnostics following the TypeSpec accessor pattern.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
value | T | Accessor value to return |