(str: string)
| 184 | } |
| 185 | |
| 186 | export function parseType(str: string): Type { |
| 187 | if (str.startsWith('byte')) return BytesType.fromString(str); |
| 188 | return PrimitiveType[str.toUpperCase() as keyof typeof PrimitiveType]; |
| 189 | } |
| 190 | |
| 191 | export function isPrimitive(type: Type): type is PrimitiveType { |
| 192 | return Boolean(PrimitiveType[type.toString().toUpperCase() as keyof typeof PrimitiveType]); |
no test coverage detected