[F] typespecTypeToJson
function typespecTypeToJson<T>(typespecType, target): [undefined | T, Diagnostic[]]
Convert a TypeSpec type to a serializable Json object. Emits diagnostics if the given type is invalid
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
typespecType | TypeSpecValue | The type to convert to Json data |
target | DiagnosticTarget | The diagnostic target in case of errors. |
Returns
[undefined
| T
, Diagnostic
[]]