Skip to content

Commit 4510fef

Browse files
committed
update generics
1 parent 37de6e0 commit 4510fef

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/types/generics/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ For example:
8181
let pos: Position[int]
8282
```
8383

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+
8493
## Dynamic Generic Type Annotation
8594
Dynamic generic annotation can be used if all generic types are detectable by the compiler.
8695

0 commit comments

Comments
 (0)