You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, like functions, type aliases are private to the module the exist in. You can use `pub`
109
+
to make the type alias public or `pub(crate)` to make it public to just its crate:
110
+
111
+
```rust
112
+
// This type alias is now public
113
+
pubtypeId=u8;
114
+
```
115
+
108
116
## Wildcard Type
109
117
Noir can usually infer the type of the variable from the context, so specifying the type of a variable is only required when it cannot be inferred. However, specifying a complex type can be tedious, especially when it has multiple generic arguments. Often some of the generic types can be inferred from the context, and Noir only needs a hint to properly infer the other types. We can partially specify a variable's type by using `_` as a marker, indicating where we still want the compiler to infer the type.
0 commit comments