TypeProvider
TypeProvider specifies functions for creating new object instances and for resolving enum values by name.
Deprecated: use types.Provider
Extended by
Section titled “Extended by”Methods
Section titled “Methods”enumValue()
Section titled “enumValue()”enumValue(
enumName):Val
EnumValue returns the numeric value of the given enum value name.
Parameters
Section titled “Parameters”enumName
Section titled “enumName”string
Returns
Section titled “Returns”findFieldType()
Section titled “findFieldType()”findFieldType(
messageType,fieldName):FieldType|undefined
FindFieldType returns the field type for a checked type value.
Parameters
Section titled “Parameters”messageType
Section titled “messageType”string
fieldName
Section titled “fieldName”string
Returns
Section titled “Returns”FieldType | undefined
findIdent()
Section titled “findIdent()”findIdent(
identName):Val|undefined
FindIdent takes a qualified identifier name and returns a Value if one exists.
Parameters
Section titled “Parameters”identName
Section titled “identName”string
Returns
Section titled “Returns”Val | undefined
findType()
Section titled “findType()”findType(
typeName):Type|undefined
FindType looks up the Type given a qualified typeName. Returns false if not found.
Parameters
Section titled “Parameters”typeName
Section titled “typeName”string
Returns
Section titled “Returns”Type | undefined
value()
Section titled “value()”value(
typeName,fields):Val
Value creates a new type value from a qualified name and map of field name to value.
Parameters
Section titled “Parameters”typeName
Section titled “typeName”string
fields
Section titled “fields”Record<string, Val>