Skip to main content
Version: Next 🚧

[F] cadlTypeToJson

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

Type Parameters

Type Parameter
T

Parameters

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

Returns

[T | undefined, Diagnostic[]]

Deprecated

use typespecTypeToJson