Skip to content

Commit 6b0e24e

Browse files
Moved struct constructor down
1 parent e2431fc commit 6b0e24e

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

libDER/DERItem.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@ import type { DERByte, DERSize } from './libDER_config.ts';
66
* DER item.
77
*/
88
export class DERItem {
9-
/**
10-
* Constructor.
11-
*
12-
* @param data DER data.
13-
* @param length DER length.
14-
*/
15-
constructor(
16-
data: Ptr<DERByte> | null = null,
17-
length: DERSize = 0,
18-
) {
19-
this.data = data;
20-
this.length = length;
21-
}
22-
239
/**
2410
* DER data.
2511
*/
@@ -33,4 +19,18 @@ export class DERItem {
3319
static {
3420
toStringTag(this, 'DERItem');
3521
}
22+
23+
/**
24+
* Constructor.
25+
*
26+
* @param data DER data.
27+
* @param length DER length.
28+
*/
29+
constructor(
30+
data: Ptr<DERByte> | null = null,
31+
length: DERSize = 0,
32+
) {
33+
this.data = data;
34+
this.length = length;
35+
}
3636
}

libDER/libDER.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ export type DERReturn =
6666
* DER item spec.
6767
*/
6868
export class DERItemSpec {
69+
/**
70+
* Offset.
71+
*/
72+
public offset: DERSize;
73+
74+
/**
75+
* Tag.
76+
*/
77+
public tag: DERTag;
78+
79+
/**
80+
* Length.
81+
*/
82+
public length: DERShort;
83+
6984
/**
7085
* Constructor.
7186
*
@@ -83,21 +98,6 @@ export class DERItemSpec {
8398
this.length = length;
8499
}
85100

86-
/**
87-
* Offset.
88-
*/
89-
public offset: DERSize;
90-
91-
/**
92-
* Tag.
93-
*/
94-
public tag: DERTag;
95-
96-
/**
97-
* Length.
98-
*/
99-
public length: DERShort;
100-
101101
static {
102102
toStringTag(this, 'DERItemSpec');
103103
}

0 commit comments

Comments
 (0)