Skip to content

Commit 1bc3283

Browse files
committed
docs(Condition): use shorthand notation for PrimitiveSymbol
1 parent 507130f commit 1bc3283

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

src/decorators/condition.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export function dynamicConditionDecoratorFactory<This extends object, Target, Va
167167
*
168168
* ```typescript
169169
* class Protocol {
170-
* @Relation(PrimitiveSymbol.u8)
170+
* @Uint8
171171
* type: number
172172
*
173173
* @IfThen(instance => instance.type === 0x01, PrimitiveSymbol.u16)
@@ -233,7 +233,7 @@ export function IfThen<This extends object, Target, Value, Args extends string>
233233
*
234234
* ```typescript
235235
* class Protocol {
236-
* @Relation(PrimitiveSymbol.u8)
236+
* @Uint8
237237
* type: number
238238
*
239239
* @IfThen(_ => _.type === 0x01, PrimitiveSymbol.u16)
@@ -292,7 +292,7 @@ export function Else<This extends object, Target, Value, Args extends string> (t
292292
*
293293
* ```typescript
294294
* class Chunk {
295-
* @Relation(PrimitiveSymbol.u8)
295+
* @Uint8
296296
* type: number
297297
*
298298
* @Choice('type', {
@@ -322,7 +322,7 @@ export function Else<This extends object, Target, Value, Args extends string> (t
322322
* _type: number
323323
*
324324
* @Count('_length')
325-
* @Relation(PrimitiveSymbol.u8)
325+
* @Uint8
326326
* data: number[]
327327
*
328328
* ...
@@ -335,18 +335,18 @@ export function Else<This extends object, Target, Value, Args extends string> (t
335335
*
336336
* class Header {
337337
* @Count(4)
338-
* @Relation(PrimitiveSymbol.u8)
338+
* @Uint8
339339
* magic: number
340340
*
341-
* @Relation(PrimitiveSymbol.u32)
341+
* @Uint32
342342
* crc: number
343343
* }
344344
*
345345
* class Protocol {
346-
* @Relation(PrimitiveSymbol.u32)
346+
* @Uint32
347347
* length: number
348348
*
349-
* @Relation(PrimitiveSymbol.u8)
349+
* @Uint8
350350
* type: number
351351
*
352352
* @Choice('type', {
@@ -363,10 +363,10 @@ export function Else<This extends object, Target, Value, Args extends string> (t
363363
*
364364
* ```typescript
365365
* class Protocol {
366-
* @Relation(PrimitiveSymbol.u32)
366+
* @Uint32
367367
* length: number
368368
*
369-
* @Relation(PrimitiveSymbol.u8)
369+
* @Uint8
370370
* type: number
371371
*
372372
* @Choice(_ => _.type, {
@@ -384,10 +384,10 @@ export function Else<This extends object, Target, Value, Args extends string> (t
384384
*
385385
* ```typescript
386386
* class Protocol {
387-
* @Relation(PrimitiveSymbol.u32)
387+
* @Uint32
388388
* length: number
389389
*
390-
* @Relation(PrimitiveSymbol.u8)
390+
* @Uint32
391391
* type: number
392392
*
393393
* @Choice('type', {
@@ -406,7 +406,7 @@ export function Else<This extends object, Target, Value, Args extends string> (t
406406
*
407407
* ```typescript
408408
* class Protocol {
409-
* @Relation(PrimitiveSymbol.u8)
409+
* @Uint8
410410
* something: number
411411
*
412412
* @Choice('something', {
@@ -489,10 +489,10 @@ export function Choice<This extends object, Value, Args extends string> (cmp: St
489489
* }
490490
*
491491
* class Protocol {
492-
* @Relation(PrimitiveType.u8)
492+
* @Uint8
493493
* foo: number
494494
*
495-
* @Relation(PrimitiveType.u8)
495+
* @Uint8
496496
* bar: number
497497
*
498498
* @Select(_ => DEFINITION[_.foo][_.bar])
@@ -519,6 +519,7 @@ export function Choice<This extends object, Value, Args extends string> (cmp: St
519519
* }[_.type]()))
520520
* data: any
521521
* }
522+
*
522523
* class Protocol {
523524
* @Uint32
524525
* length: number

0 commit comments

Comments
 (0)