Skip to content

[F] getMediaTypeHint

function getMediaTypeHint(program, target): undefined | string

Get the default media type hint for the given target type.

This value is a hint ONLY. Emitters are not required to use it, but may use it to get the default media type associated with a TypeSpec type.

Parameters

ParameterTypeDescription
programProgramthe Program containing the target
targetTypethe target to get the MIME type for

Returns

undefined | string

the default media type hint for the target, if any