-
Notifications
You must be signed in to change notification settings - Fork 7
/
types.js
235 lines (235 loc) · 12.6 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/**
* @template T
* @typedef {new (...args: any) => T} AnyConstructor
*/
/**
* @template {Attribute} T
* @typedef {AnyConstructor<T> & EntityConstructor | StringConstructor | NumberConstructor | BigIntConstructor
* | BooleanConstructor | ArrayConstructor | MirroredEntityConstructor<T>} AttributeConstructor
*/
/**
* @typedef {[Number, Number]} Coordinates
* @typedef {IEntity | String | Number | BigInt | Boolean | Array} TerminalAttribute
* @typedef {TerminalAttribute | MirroredEntity<TerminalAttribute>} Attribute
* @typedef {(
* AttributeConstructor<Attribute> | AttributeConstructor<Attribute>[]
* | MirroredEntity<Attribute> | Union<any> | Union<any>[] | ComputedType
* )} AttributeTypeDescription
* @typedef {(entity: IEntity) => Attribute} ValueSupplier
*/
/**
* @template {Attribute} T
* @typedef {T extends String
* ? StringConstructor
* : T extends Number
* ? NumberConstructor
* : T extends BigInt
* ? BigIntConstructor
* : T extends Boolean
* ? BooleanConstructor
* : T extends Array
* ? ArrayConstructor
* : T extends MirroredEntity<infer R>
* ? MirroredEntityConstructor<R>
* : T extends IEntity
* ? AnyConstructor<T> & EntityConstructor
* : any
* } ConstructorType
*/
/**
* @template T
* @typedef {T extends AnyConstructor<infer R>
* ? R
* : T extends StringConstructor
* ? String
* : T extends NumberConstructor
* ? Number
* : T extends BigIntConstructor
* ? BigInt
* : T extends BooleanConstructor
* ? Boolean
* : T extends ArrayConstructor
* ? Array
* : any
* } ConstructedType
*/
/**
* @template T
* @typedef {T extends [infer A] ? DescribedType<A>
* : T extends [infer A, ...infer B] ? (DescribedType<A> | DescribedTypesFromArray<B>)
* : any
* } DescribedTypesFromArray
**/
/**
* @template T
* @typedef {T extends AnyConstructor<infer R>
* ? R
* : T extends StringConstructor
* ? String
* : T extends NumberConstructor
* ? Number
* : T extends BigIntConstructor
* ? BigInt
* : T extends BooleanConstructor
* ? Boolean
* : T extends Array<infer R>
* ? DescribedType<R>[]
* : T extends MirroredEntity<infer R>
* ? DescribedType<R>
* : T extends Union<infer R>
* ? DescribedTypesFromArray<R>
* : T
* } DescribedType
*/
/**
* @typedef {import("./js/entity/AttributeInfo.js").default} AttributeInfo
* @typedef {{ [key: String]: AttributeInfo }} AttributeDeclarations
*/
/**
* @typedef {CustomEvent<{ value: Coordinates }>} UEBDragEvent
*/
/**
* @template T
* @typedef {{
* (value: Boolean): BooleanConstructor,
* (value: Number): NumberConstructor,
* (value: String): StringConstructor,
* (value: BigInt): BigIntConstructor,
* (value: T): typeof value.constructor,
* }} TypeGetter
*/
/**
* @template {any[]} T
* @typedef {import("./js/entity/Union.js").default<T>} Union
*/
/**
* @typedef {typeof import("./js/Blueprint.js").default} BlueprintConstructor
* @typedef {typeof import("./js/element/LinkElement.js").default} LinkElementConstructor
* @typedef {typeof import("./js/element/NodeElement.js").default} NodeElementConstructor
* @typedef {typeof import("./js/element/PinElement.js").default} PinElementConstructor
* @typedef {typeof import("./js/element/WindowElement.js").default} WindowElementConstructor
* @typedef {typeof import("./js/entity/IEntity.js").default} EntityConstructor
* @typedef {typeof import("./js/entity/ObjectEntity.js").default} ObjectEntityConstructor
*/
/**
* @typedef {import("./js/Blueprint.js").default} Blueprint
* @typedef {import("./js/element/ColorHandlerElement.js").default} ColorHandlerElement
* @typedef {import("./js/element/ColorSliderElement.js").default} ColorSliderElement
* @typedef {import("./js/element/DropdownElement.js").default} DropdownElement
* @typedef {import("./js/element/ElementFactory.js").default} ElementFactory
* @typedef {import("./js/element/IDraggableControlElement.js").default} IDraggableControlElement
* @typedef {import("./js/element/IDraggableElement.js").default} IDraggableElement
* @typedef {import("./js/element/IElement.js").default} IElement
* @typedef {import("./js/element/IFromToPositionedElement.js").default} IFromToPositionedElement
* @typedef {import("./js/element/InputElement.js").default} InputElement
* @typedef {import("./js/element/ISelectableDraggableElement.js").default} ISelectableDraggableElement
* @typedef {import("./js/element/LinkElement.js").default} LinkElement
* @typedef {import("./js/element/NodeElement.js").default} NodeElement
* @typedef {import("./js/element/PinElement.js").default} PinElement
* @typedef {import("./js/element/SelectorElement.js").default} SelectorElement
* @typedef {import("./js/element/WindowElement.js").default} WindowElement
* @typedef {import("./js/entity/ByteEntity.js").default} ByteEntity
* @typedef {import("./js/entity/ColorChannelEntity.js").default} ColorChannelEntity
* @typedef {import("./js/entity/ComputedType.js").default} ComputedType
* @typedef {import("./js/entity/EnumDisplayValueEntity.js").default} EnumDisplayValueEntity
* @typedef {import("./js/entity/EnumEntity.js").default} EnumEntity
* @typedef {import("./js/entity/FormatTextEntity.js").default} FormatTextEntity
* @typedef {import("./js/entity/FunctionReferenceEntity.js").default} FunctionReferenceEntity
* @typedef {import("./js/entity/GuidEntity.js").default} GuidEntity
* @typedef {import("./js/entity/IdentifierEntity.js").default} IdentifierEntity
* @typedef {import("./js/entity/IEntity.js").default} IEntity
* @typedef {import("./js/entity/Integer64Entity.js").default} Integer64Entity
* @typedef {import("./js/entity/IntegerEntity.js").default} IntegerEntity
* @typedef {import("./js/entity/InvariantTextEntity.js").default} InvariantTextEntity
* @typedef {import("./js/entity/KeyBindingEntity.js").default} KeyBindingEntity
* @typedef {import("./js/entity/LinearColorEntity.js").default} LinearColorEntity
* @typedef {import("./js/entity/LocalizedTextEntity.js").default} LocalizedTextEntity
* @typedef {import("./js/entity/MacroGraphReferenceEntity.js").default} MacroGraphReferenceEntity
* @typedef {import("./js/entity/NaturalNumberEntity.js").default} NaturalNumberEntity
* @typedef {import("./js/entity/ObjectEntity.js").default} ObjectEntity
* @typedef {import("./js/entity/ObjectReferenceEntity.js").default} ObjectReferenceEntity
* @typedef {import("./js/entity/objects/KnotEntity.js").default} KnotEntity
* @typedef {import("./js/entity/PathSymbolEntity.js").default} PathSymbolEntity
* @typedef {import("./js/entity/PinEntity.js").default} PinEntity
* @typedef {import("./js/entity/PinReferenceEntity.js").default} PinReferenceEntity
* @typedef {import("./js/entity/PinTypeEntity.js").default} PinTypeEntity
* @typedef {import("./js/entity/RBSerializationVector2DEntity.js").default} RBSerializationVector2DEntity
* @typedef {import("./js/entity/RotatorEntity.js").default} RotatorEntity
* @typedef {import("./js/entity/SimpleSerializationRotatorEntity.js").default} SimpleSerializationRotatorEntity
* @typedef {import("./js/entity/SimpleSerializationVector2DEntity.js").default} SimpleSerializationVector2DEntity
* @typedef {import("./js/entity/SimpleSerializationVectorEntity.js").default} SimpleSerializationVectorEntity
* @typedef {import("./js/entity/SymbolEntity.js").default} SymbolEntity
* @typedef {import("./js/entity/TerminalTypeEntity.js").default} TerminalTypeEntity
* @typedef {import("./js/entity/UnknownKeysEntity.js").default} UnknownKeysEntity
* @typedef {import("./js/entity/UnknownPinEntity.js").default} UnknownPinEntity
* @typedef {import("./js/entity/VariableReferenceEntity.js").default} VariableReferenceEntity
* @typedef {import("./js/entity/Vector2DEntity.js").default} Vector2DEntity
* @typedef {import("./js/entity/VectorEntity.js").default} VectorEntity
* @typedef {import("./js/input/IInput.js").default} IInput
* @typedef {import("./js/input/keyboard/KeyboardShortcut.js").default} KeyboardShortcut
* @typedef {import("./js/input/mouse/MouseMoveDraggable.js").default} MouseMoveDraggable
* @typedef {import("./js/template/BlueprintTemplate.js").default} BlueprintTemplate
* @typedef {import("./js/template/ColorHandlerTemplate.js").default} ColorHandlerTemplate
* @typedef {import("./js/template/ColorSliderTemplate.js").default} ColorSliderTemplate
* @typedef {import("./js/template/IDraggableControlTemplate.js").default} IDraggableControlTemplate
* @typedef {import("./js/template/IDraggablePositionedTemplate.js").default} IDraggablePositionedTemplate
* @typedef {import("./js/template/IDraggableTemplate.js").default} IDraggableTemplate
* @typedef {import("./js/template/IFromToPositionedTemplate.js").default} IFromToPositionedTemplate
* @typedef {import("./js/template/IResizeableTemplate.js").default} IResizeableTemplate
* @typedef {import("./js/template/ISelectableDraggableTemplate.js").default} ISelectableDraggableTemplate
* @typedef {import("./js/template/ITemplate.js").default} ITemplate
* @typedef {import("./js/template/LinkTemplate.js").default} LinkTemplate
* @typedef {import("./js/template/node/CommentNodeTemplate.js").default} CommentNodeTemplate
* @typedef {import("./js/template/node/EventNodeTemplate.js").default} EventNodeTemplate
* @typedef {import("./js/template/node/KnotNodeTemplate.js").default} KnotNodeTemplate
* @typedef {import("./js/template/node/NodeTemplate.js").default} NodeTemplate
* @typedef {import("./js/template/node/VariableAccessNodeTemplate.js").default} VariableAccessNodeTemplate
* @typedef {import("./js/template/node/VariableConversionNodeTemplate.js").default} VariableConversionNodeTemplate
* @typedef {import("./js/template/node/VariableMangementNodeTemplate.js").default} VariableMangementNodeTemplate
* @typedef {import("./js/template/node/VariableOperationNodeTemplate.js").default} VariableOperationNodeTemplate
* @typedef {import("./js/template/pin/BoolPinTemplate.js").default} BoolPinTemplate
* @typedef {import("./js/template/pin/DropdownTemplate.js").default} DropdownTemplate
* @typedef {import("./js/template/pin/EnumPinTemplate.js").default} EnumPinTemplate
* @typedef {import("./js/template/pin/ExecPinTemplate.js").default} ExecPinTemplate
* @typedef {import("./js/template/pin/IInputPinTemplate.js").default} IInputPinTemplate
* @typedef {import("./js/template/pin/InputTemplate.js").default} InputTemplate
* @typedef {import("./js/template/pin/Int64PinTemplate.js").default} Int64PinTemplate
* @typedef {import("./js/template/pin/IntPinTemplate.js").default} IntPinTemplate
* @typedef {import("./js/template/pin/INumericPinTemplate.js").default} INumericPinTemplate
* @typedef {import("./js/template/pin/KnotPinTemplate.js").default} KnotPinTemplate
* @typedef {import("./js/template/pin/LinearColorPinTemplate.js").default} LinearColorPinTemplate
* @typedef {import("./js/template/pin/MinimalPinTemplate.js").default} MinimalPinTemplate
* @typedef {import("./js/template/pin/NamePinTemplate.js").default} NamePinTemplate
* @typedef {import("./js/template/pin/RealPinTemplate.js").default} RealPinTemplate
* @typedef {import("./js/template/pin/ReferencePinTemplate.js").default} ReferencePinTemplate
* @typedef {import("./js/template/pin/RotatorPinTemplate.js").default} RotatorPinTemplate
* @typedef {import("./js/template/pin/StringPinTemplate.js").default} StringPinTemplate
* @typedef {import("./js/template/pin/Vector2DPinTemplate.js").default} Vector2DPinTemplate
* @typedef {import("./js/template/pin/VectorPinTemplate.js").default} VectorPinTemplate
* @typedef {import("./js/template/SelectorTemplate.js").default} SelectorTemplate
* @typedef {import("./js/template/window/ColorPickerWindowTemplate.js").default} ColorPickerWindowTemplate
* @typedef {import("./js/template/window/WindowTemplate.js").default} WindowTemplate
* @typedef {import ("./tests/fixtures/BlueprintFixture.js").default} BlueprintFixture
* @typedef {import("lit").CSSResult} CSSResult
* @typedef {import("lit").PropertyValues} PropertyValues
* @typedef {import("lit").TemplateResult} TemplateResult
*/
/**
* @template {AttributeConstructor<Attribute>} T
* @typedef {import("./js/serialization/Serializer.js").default<T>} Serializer
*/
/**
* @template {Attribute} T
* @typedef {import("./js/entity/MirroredEntity.js").default<T>} MirroredEntity
*/
/**
* @template {Attribute} T
* @typedef {typeof import("./js/entity/MirroredEntity.js").default<T>} MirroredEntityConstructor
*/
/**
* @template T
* @typedef {{
* evaluate<R, Arg>(pageFunction: (node: T, arg: Arg) => R, arg: Arg, options?: { timeout?: number }): Promise<R>
* evaluate<R>(pageFunction: (node: T) => R, options?: { timeout?: number }): Promise<R>
* } & import("@playwright/test").Locator} Locator
*/