File tree 6 files changed +54
-11
lines changed
6 files changed +54
-11
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,8 @@ p + .code-collapse__wrapper,
25
25
26
26
.starting-page-card {
27
27
border-radius : 7px ;
28
+ }
29
+
30
+ # mermaid .flowchart-link {
31
+ stroke : # 59595c6b !important ;
28
32
}
Original file line number Diff line number Diff line change 43
43
44
44
<secondary-label id =" wip" name =" WIP" color =" red" >Work in progress</secondary-label >
45
45
<secondary-label id =" beta" name =" β" color =" tangerine" >Beta</secondary-label >
46
- <secondary-label id =" tl1.1" name =" Available in Parser v1.1" color =" strawberry" >Available in type-lang/parser 1.1+</secondary-label >
47
- <secondary-label id =" tl1.2" name =" Available in Parser v1.2" color =" strawberry" >Available in type-lang/parser 1.2+</secondary-label >
48
- <secondary-label id =" tl1.4" name =" Available in Parser v1.4" color =" strawberry" >Available in type-lang/parser 1.4+</secondary-label >
46
+ <secondary-label id =" tl1.1" name =" Parser v1.1" color =" strawberry" >Available in type-lang/parser 1.1+</secondary-label >
47
+ <secondary-label id =" tl1.2" name =" Parser v1.2" color =" strawberry" >Available in type-lang/parser 1.2+</secondary-label >
48
+ <secondary-label id =" tl1.4" name =" Parser v1.4" color =" strawberry" >Available in type-lang/parser 1.4+</secondary-label >
49
49
<secondary-label id =" r1.1" name =" Available in Reader v1.1" color =" strawberry" >Available in type-lang/reader 1.1+</secondary-label >
50
50
</labels >
Original file line number Diff line number Diff line change @@ -215,7 +215,6 @@ _before the type_ or _before the parameter name._
215
215
216
216
## Attributes
217
217
218
- <primary-label ref="experimental"/>
219
218
<secondary-label ref="tl1.2"/>
220
219
221
220
Each callable parameter allows you to define list of additional attributes.
Original file line number Diff line number Diff line change @@ -154,7 +154,6 @@ In addition to modern list declarations such as `list<int>` or
154
154
155
155
## Attributes
156
156
157
- < primary - label ref = " experimental" / >
158
157
< secondary - label ref = " tl1.1" / >
159
158
160
159
Each template argument allows you to define list of additional attributes .
Original file line number Diff line number Diff line change @@ -11,20 +11,35 @@ separate expression is also supported.
11
11
Each union type is separated by a pipe character (` | ` ) and may contain any other
12
12
type definition.
13
13
14
- > ` A ` ** OR ** ` B ` ** OR ** ` C ` .
14
+
15
15
> ``` typescript
16
16
> A | B | C
17
17
> ` ` `
18
+ >
19
+ > ` ` ` mermaid
20
+ > graph LR
21
+ > U {{ A & vert ; B & vert ; C }}
22
+ > U -- OR -- > A (A )
23
+ > U -- OR -- > B (B )
24
+ > U -- OR -- > C (C )
25
+ > ` ` `
18
26
19
27
### Intersection Types
20
28
21
29
Each intersection type is separated by an ampersand character ( ` & ` ) and may
22
30
contain any other type definition.
23
31
24
- > ` A ` **AND** ` B ` **AND** ` C ` .
25
32
> ` ` ` typescript
26
33
> A & B & C
27
34
> ` ` `
35
+ >
36
+ > ` ` ` mermaid
37
+ > graph LR
38
+ > U {{ A & amp ; B & amp ; C }}
39
+ > U -- AND -- > A (A )
40
+ > U -- AND -- > B (B )
41
+ > U -- AND -- > C (C )
42
+ > ` ` `
28
43
29
44
### Nullable Types
30
45
@@ -38,6 +53,13 @@ and is written as `?T.`
38
53
> ` ` ` typescript
39
54
> ? Example
40
55
> ` ` `
56
+ > ` ` ` mermaid
57
+ > graph LR
58
+ > U {{ ? Example }}
59
+ > U -- > SU {{ Example & vert ; null }}
60
+ > SU -- OR -- > A (Example )
61
+ > SU -- OR -- > B (null )
62
+ > ` ` `
41
63
42
64
</tab>
43
65
<tab title="Counterexamples">
@@ -58,12 +80,32 @@ and is written as `?T.`
58
80
59
81
Parentheses can be used to disambiguate types.
60
82
61
- > ` A ` **AND** ` B ` _or_ ` C `
83
+ > Disjunctive form (DNF).
84
+ >
62
85
> ` ` ` typescript
63
86
> (A & B ) | C
64
87
> ` ` `
65
- >
66
- > ` A ` **AND** ` C ` _or_ ` B ` **AND** ` C `
88
+ >
89
+ > ` ` ` mermaid
90
+ > graph LR
91
+ > U {{ & lpar ; A & amp ; B & rpar ; & vert ; C }}
92
+ > U -- OR -- > P1 {{A & amp ; B }}
93
+ > P1 -- AND -- > A (A )
94
+ > P1 -- AND -- > B (B )
95
+ > U -- OR -- > C (C )
96
+ > ` ` `
97
+
98
+
99
+ > Conjunctive form (CNF).
67
100
> ` ` ` typescript
68
101
> (A | B ) & C
69
102
> ` ` `
103
+ >
104
+ > ` ` ` mermaid
105
+ > graph LR
106
+ > U {{ & lpar ; A & vert ; B & rpar ; & amp ; C }}
107
+ > U -- AND -- > P1 {{A & vert ; B }}
108
+ > P1 -- OR -- > A (A )
109
+ > P1 -- OR -- > B (B )
110
+ > U -- AND -- > C (C )
111
+ > ` ` `
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ array{
112
112
113
113
## Attributes
114
114
115
- <primary-label ref =" experimental " />
116
115
<secondary-label ref =" tl1.1 " />
117
116
118
117
Each shape field allows you to define list of additional attributes.
You can’t perform that action at this time.
0 commit comments