Skip to content

Braga has been retired. The next public testnet is coming in September 2026. Read the announcement →

hasType(name, tag): TypeOfNode

Defined in: src/query/expression.ts:335

The attribute is set with exactly this type, whatever its value.

Useful when the same name is written with different types across entities — a comparison already asserts the type, so this is for asking about the type alone.

string

UserTypeTag

The type tag: bool, i32, u256, dec, bytes32, str, addr or key.

TypeOfNode

If the tag is not a settable type, or the name is a system attribute (whose type is fixed).

hasType("age", "i32") // TYPEOF(age) = i32