@@ -2478,159 +2478,157 @@ export class Constant<T> extends Layout<T> {
2478
2478
}
2479
2479
2480
2480
/** Factory for {@link GreedyCount}. */
2481
- export const greedy = ( ( elementSpan : number , property ?: string ) => new GreedyCount ( elementSpan , property ) ) ;
2481
+ export const greedy = ( ( elementSpan : number , property ?: string ) : GreedyCount => new GreedyCount ( elementSpan , property ) ) ;
2482
2482
2483
2483
/** Factory for {@link OffsetLayout}. */
2484
- export const offset
2485
- = ( ( layout : Layout < number > , offset ?: number , property ?: string ) => new OffsetLayout ( layout , offset , property ) ) ;
2484
+ export const offset = ( ( layout : Layout < number > , offset ?: number , property ?: string ) : OffsetLayout =>
2485
+ new OffsetLayout ( layout , offset , property ) ) ;
2486
2486
2487
2487
/** Factory for {@link UInt|unsigned int layouts} spanning one
2488
2488
* byte. */
2489
- export const u8 = ( ( property ?: string ) => new UInt ( 1 , property ) ) ;
2489
+ export const u8 = ( ( property ?: string ) : UInt => new UInt ( 1 , property ) ) ;
2490
2490
2491
2491
/** Factory for {@link UInt|little-endian unsigned int layouts}
2492
2492
* spanning two bytes. */
2493
- export const u16 = ( ( property ?: string ) => new UInt ( 2 , property ) ) ;
2493
+ export const u16 = ( ( property ?: string ) : UInt => new UInt ( 2 , property ) ) ;
2494
2494
2495
2495
/** Factory for {@link UInt|little-endian unsigned int layouts}
2496
2496
* spanning three bytes. */
2497
- export const u24 = ( ( property ?: string ) => new UInt ( 3 , property ) ) ;
2497
+ export const u24 = ( ( property ?: string ) : UInt => new UInt ( 3 , property ) ) ;
2498
2498
2499
2499
/** Factory for {@link UInt|little-endian unsigned int layouts}
2500
2500
* spanning four bytes. */
2501
- export const u32 = ( ( property ?: string ) => new UInt ( 4 , property ) ) ;
2501
+ export const u32 = ( ( property ?: string ) : UInt => new UInt ( 4 , property ) ) ;
2502
2502
2503
2503
/** Factory for {@link UInt|little-endian unsigned int layouts}
2504
2504
* spanning five bytes. */
2505
- export const u40 = ( ( property ?: string ) => new UInt ( 5 , property ) ) ;
2505
+ export const u40 = ( ( property ?: string ) : UInt => new UInt ( 5 , property ) ) ;
2506
2506
2507
2507
/** Factory for {@link UInt|little-endian unsigned int layouts}
2508
2508
* spanning six bytes. */
2509
- export const u48 = ( ( property ?: string ) => new UInt ( 6 , property ) ) ;
2509
+ export const u48 = ( ( property ?: string ) : UInt => new UInt ( 6 , property ) ) ;
2510
2510
2511
2511
/** Factory for {@link NearUInt64|little-endian unsigned int
2512
2512
* layouts} interpreted as Numbers. */
2513
- export const nu64 = ( ( property ?: string ) => new NearUInt64 ( property ) ) ;
2513
+ export const nu64 = ( ( property ?: string ) : NearUInt64 => new NearUInt64 ( property ) ) ;
2514
2514
2515
2515
/** Factory for {@link UInt|big-endian unsigned int layouts}
2516
2516
* spanning two bytes. */
2517
- export const u16be = ( ( property ?: string ) => new UIntBE ( 2 , property ) ) ;
2517
+ export const u16be = ( ( property ?: string ) : UIntBE => new UIntBE ( 2 , property ) ) ;
2518
2518
2519
2519
/** Factory for {@link UInt|big-endian unsigned int layouts}
2520
2520
* spanning three bytes. */
2521
- export const u24be = ( ( property ?: string ) => new UIntBE ( 3 , property ) ) ;
2521
+ export const u24be = ( ( property ?: string ) : UIntBE => new UIntBE ( 3 , property ) ) ;
2522
2522
2523
2523
/** Factory for {@link UInt|big-endian unsigned int layouts}
2524
2524
* spanning four bytes. */
2525
- export const u32be = ( ( property ?: string ) => new UIntBE ( 4 , property ) ) ;
2525
+ export const u32be = ( ( property ?: string ) : UIntBE => new UIntBE ( 4 , property ) ) ;
2526
2526
2527
2527
/** Factory for {@link UInt|big-endian unsigned int layouts}
2528
2528
* spanning five bytes. */
2529
- export const u40be = ( ( property ?: string ) => new UIntBE ( 5 , property ) ) ;
2529
+ export const u40be = ( ( property ?: string ) : UIntBE => new UIntBE ( 5 , property ) ) ;
2530
2530
2531
2531
/** Factory for {@link UInt|big-endian unsigned int layouts}
2532
2532
* spanning six bytes. */
2533
- export const u48be = ( ( property ?: string ) => new UIntBE ( 6 , property ) ) ;
2533
+ export const u48be = ( ( property ?: string ) : UIntBE => new UIntBE ( 6 , property ) ) ;
2534
2534
2535
2535
/** Factory for {@link NearUInt64BE|big-endian unsigned int
2536
2536
* layouts} interpreted as Numbers. */
2537
- export const nu64be = ( ( property ?: string ) => new NearUInt64BE ( property ) ) ;
2537
+ export const nu64be = ( ( property ?: string ) : NearUInt64BE => new NearUInt64BE ( property ) ) ;
2538
2538
2539
2539
/** Factory for {@link Int|signed int layouts} spanning one
2540
2540
* byte. */
2541
- export const s8 = ( ( property ?: string ) => new Int ( 1 , property ) ) ;
2541
+ export const s8 = ( ( property ?: string ) : Int => new Int ( 1 , property ) ) ;
2542
2542
2543
2543
/** Factory for {@link Int|little-endian signed int layouts}
2544
2544
* spanning two bytes. */
2545
- export const s16 = ( ( property ?: string ) => new Int ( 2 , property ) ) ;
2545
+ export const s16 = ( ( property ?: string ) : Int => new Int ( 2 , property ) ) ;
2546
2546
2547
2547
/** Factory for {@link Int|little-endian signed int layouts}
2548
2548
* spanning three bytes. */
2549
- export const s24 = ( ( property ?: string ) => new Int ( 3 , property ) ) ;
2549
+ export const s24 = ( ( property ?: string ) : Int => new Int ( 3 , property ) ) ;
2550
2550
2551
2551
/** Factory for {@link Int|little-endian signed int layouts}
2552
2552
* spanning four bytes. */
2553
- export const s32 = ( ( property ?: string ) => new Int ( 4 , property ) ) ;
2553
+ export const s32 = ( ( property ?: string ) : Int => new Int ( 4 , property ) ) ;
2554
2554
2555
2555
/** Factory for {@link Int|little-endian signed int layouts}
2556
2556
* spanning five bytes. */
2557
- export const s40 = ( ( property ?: string ) => new Int ( 5 , property ) ) ;
2557
+ export const s40 = ( ( property ?: string ) : Int => new Int ( 5 , property ) ) ;
2558
2558
2559
2559
/** Factory for {@link Int|little-endian signed int layouts}
2560
2560
* spanning six bytes. */
2561
- export const s48 = ( ( property ?: string ) => new Int ( 6 , property ) ) ;
2561
+ export const s48 = ( ( property ?: string ) : Int => new Int ( 6 , property ) ) ;
2562
2562
2563
2563
/** Factory for {@link NearInt64|little-endian signed int layouts}
2564
2564
* interpreted as Numbers. */
2565
- export const ns64 = ( ( property ?: string ) => new NearInt64 ( property ) ) ;
2565
+ export const ns64 = ( ( property ?: string ) : NearInt64 => new NearInt64 ( property ) ) ;
2566
2566
2567
2567
/** Factory for {@link Int|big-endian signed int layouts}
2568
2568
* spanning two bytes. */
2569
- export const s16be = ( ( property ?: string ) => new IntBE ( 2 , property ) ) ;
2569
+ export const s16be = ( ( property ?: string ) : IntBE => new IntBE ( 2 , property ) ) ;
2570
2570
2571
2571
/** Factory for {@link Int|big-endian signed int layouts}
2572
2572
* spanning three bytes. */
2573
- export const s24be = ( ( property ?: string ) => new IntBE ( 3 , property ) ) ;
2573
+ export const s24be = ( ( property ?: string ) : IntBE => new IntBE ( 3 , property ) ) ;
2574
2574
2575
2575
/** Factory for {@link Int|big-endian signed int layouts}
2576
2576
* spanning four bytes. */
2577
- export const s32be = ( ( property ?: string ) => new IntBE ( 4 , property ) ) ;
2577
+ export const s32be = ( ( property ?: string ) : IntBE => new IntBE ( 4 , property ) ) ;
2578
2578
2579
2579
/** Factory for {@link Int|big-endian signed int layouts}
2580
2580
* spanning five bytes. */
2581
- export const s40be = ( ( property ?: string ) => new IntBE ( 5 , property ) ) ;
2581
+ export const s40be = ( ( property ?: string ) : IntBE => new IntBE ( 5 , property ) ) ;
2582
2582
2583
2583
/** Factory for {@link Int|big-endian signed int layouts}
2584
2584
* spanning six bytes. */
2585
- export const s48be = ( ( property ?: string ) => new IntBE ( 6 , property ) ) ;
2585
+ export const s48be = ( ( property ?: string ) : IntBE => new IntBE ( 6 , property ) ) ;
2586
2586
2587
2587
/** Factory for {@link NearInt64BE|big-endian signed int layouts}
2588
2588
* interpreted as Numbers. */
2589
- export const ns64be = ( ( property ?: string ) => new NearInt64BE ( property ) ) ;
2589
+ export const ns64be = ( ( property ?: string ) : NearInt64BE => new NearInt64BE ( property ) ) ;
2590
2590
2591
2591
/** Factory for {@link Float|little-endian 32-bit floating point} values. */
2592
- export const f32 = ( ( property ?: string ) => new Float ( property ) ) ;
2592
+ export const f32 = ( ( property ?: string ) : Float => new Float ( property ) ) ;
2593
2593
2594
2594
/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */
2595
- export const f32be = ( ( property ?: string ) => new FloatBE ( property ) ) ;
2595
+ export const f32be = ( ( property ?: string ) : FloatBE => new FloatBE ( property ) ) ;
2596
2596
2597
2597
/** Factory for {@link Double|little-endian 64-bit floating point} values. */
2598
- export const f64 = ( ( property ?: string ) => new Double ( property ) ) ;
2598
+ export const f64 = ( ( property ?: string ) : Double => new Double ( property ) ) ;
2599
2599
2600
2600
/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */
2601
- export const f64be = ( ( property ?: string ) => new DoubleBE ( property ) ) ;
2601
+ export const f64be = ( ( property ?: string ) : DoubleBE => new DoubleBE ( property ) ) ;
2602
2602
2603
2603
/** Factory for {@link Structure} values. */
2604
- export const struct
2605
- = ( < T > ( fields : Layout < T [ keyof T ] > [ ] , property ?: string , decodePrefixes ?: boolean ) =>
2604
+ export const struct = ( < T > ( fields : Layout < T [ keyof T ] > [ ] , property ?: string , decodePrefixes ?: boolean ) : Structure < T > =>
2606
2605
new Structure < T > ( fields , property , decodePrefixes ) ) ;
2607
2606
2608
2607
/** Factory for {@link BitStructure} values. */
2609
- export const bits
2610
- = ( ( word : UInt | UIntBE , msb : boolean | string , property ?: string ) => new BitStructure ( word , msb , property ) ) ;
2608
+ export const bits = ( ( word : UInt | UIntBE , msb : boolean | string , property ?: string ) : BitStructure =>
2609
+ new BitStructure ( word , msb , property ) ) ;
2611
2610
2612
2611
/** Factory for {@link Sequence} values. */
2613
- export const seq
2614
- = ( < T > ( elementLayout : Layout < T > , count : number | ExternalLayout , property ?: string ) =>
2612
+ export const seq = ( < T > ( elementLayout : Layout < T > , count : number | ExternalLayout , property ?: string ) : Sequence < T > =>
2615
2613
new Sequence < T > ( elementLayout , count , property ) ) ;
2616
2614
2617
2615
/** Factory for {@link Union} values. */
2618
- export const union
2619
- = ( ( discr : Layout < LayoutObject > | UnionDiscriminator , defaultLayout : Layout < LayoutObject > | null , property : string ) =>
2616
+ export const union = ( ( discr : Layout < LayoutObject > | UnionDiscriminator ,
2617
+ defaultLayout : Layout < LayoutObject > | null , property : string ) : Union =>
2620
2618
new Union ( discr , defaultLayout , property ) ) ;
2621
2619
2622
2620
/** Factory for {@link UnionLayoutDiscriminator} values. */
2623
- export const unionLayoutDiscriminator
2624
- = ( ( layout : ExternalLayout , property : string ) => new UnionLayoutDiscriminator ( layout , property ) ) ;
2621
+ export const unionLayoutDiscriminator = ( ( layout : ExternalLayout , property : string ) : UnionLayoutDiscriminator =>
2622
+ new UnionLayoutDiscriminator ( layout , property ) ) ;
2625
2623
2626
2624
/** Factory for {@link Blob} values. */
2627
- export const blob = ( ( length : number | ExternalLayout , property ?: string ) => new Blob ( length , property ) ) ;
2625
+ export const blob = ( ( length : number | ExternalLayout , property ?: string ) : Blob => new Blob ( length , property ) ) ;
2628
2626
2629
2627
/** Factory for {@link CString} values. */
2630
- export const cstr = ( ( property ?: string ) => new CString ( property ) ) ;
2628
+ export const cstr = ( ( property ?: string ) : CString => new CString ( property ) ) ;
2631
2629
2632
2630
/** Factory for {@link UTF8} values. */
2633
- export const utf8 = ( ( maxSpan : number , property ?: string ) => new UTF8 ( maxSpan , property ) ) ;
2631
+ export const utf8 = ( ( maxSpan : number , property ?: string ) : UTF8 => new UTF8 ( maxSpan , property ) ) ;
2634
2632
2635
2633
/** Factory for {@link Constant} values. */
2636
- export const constant = ( < T > ( value : T , property ?: string ) => new Constant ( value , property ) ) ;
2634
+ export const constant = ( < T > ( value : T , property ?: string ) : Constant < T > => new Constant ( value , property ) ) ;
0 commit comments