Skip to content

[F] cadlTypeToJson

function cadlTypeToJson<T>(typespecType, target): [undefined | T, Diagnostic[]]

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
typespecTypeTypeSpecValueThe type to convert to Json data
targetDiagnosticTargetThe diagnostic target in case of errors.

Returns

[undefined | T, Diagnostic[]]

Deprecated

use typespecTypeToJson