Skip to content

TypeProvider

TypeProvider specifies functions for creating new object instances and for resolving enum values by name.

Deprecated: use types.Provider

enumValue(enumName): Val

EnumValue returns the numeric value of the given enum value name.

string

Val


findFieldType(messageType, fieldName): FieldType | undefined

FindFieldType returns the field type for a checked type value.

string

string

FieldType | undefined


findIdent(identName): Val | undefined

FindIdent takes a qualified identifier name and returns a Value if one exists.

string

Val | undefined


findType(typeName): Type | undefined

FindType looks up the Type given a qualified typeName. Returns false if not found.

string

Type | undefined


value(typeName, fields): Val

Value creates a new type value from a qualified name and map of field name to value.

string

Record<string, Val>

Val