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
Copy file name to clipboardExpand all lines: src/types/generics/index.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,15 @@ For example:
81
81
let pos: Position[int]
82
82
```
83
83
84
+
## Generics for Strict Type Aliases
85
+
86
+
Strict type aliases support generics. There is no additional syntax to use it. Combine only what you know with the strict type declaration declaration.
87
+
88
+
For example:
89
+
```jule
90
+
type Slice[T]: []T
91
+
```
92
+
84
93
## Dynamic Generic Type Annotation
85
94
Dynamic generic annotation can be used if all generic types are detectable by the compiler.
0 commit comments