[F] typespecTypeToJson
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
[T
| undefined
, Diagnostic
[]]