[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
Section titled “Type Parameters”| Type Parameter | 
|---|
| T | 
Parameters
Section titled “Parameters”| Parameter | Type | Description | 
|---|---|---|
| typespecType | TypeSpecValue | The type to convert to Json data | 
| target | DiagnosticTarget | The diagnostic target in case of errors. | 
Returns
Section titled “Returns”[undefined | T, Diagnostic[]]