File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -61,4 +61,8 @@ export class Principal {
61
61
const matches = result . match ( / .{ 1 , 5 } / g) ;
62
62
return matches ? matches . join ( '-' ) : '' ;
63
63
}
64
+
65
+ public toString ( ) {
66
+ return this . toText ( ) ;
67
+ }
64
68
}
Original file line number Diff line number Diff line change
1
+ declare module 'base32.js' {
2
+ type Ret = {
3
+ finalize : ( ) => any ;
4
+ } ;
5
+
6
+ interface DecoderConfig {
7
+ type ?: 'rfc4648' | 'crockford' | 'base32hex' ;
8
+ alphabet ?: string ;
9
+ lc ?: boolean ;
10
+ }
11
+ class Decoder {
12
+ constructor ( options ?: DecoderConfig ) ;
13
+ write ( str : string ) : this;
14
+ finalize ( str ?: string ) : ArrayBuffer ;
15
+ }
16
+ class Encoder {
17
+ private buf : ArrayBuffer ;
18
+ private charmap : { [ key : number ] : number } ;
19
+ constructor ( options ?: DecoderConfig ) ;
20
+ write ( buf : ArrayBuffer ) : this;
21
+ finalize ( str ?: ArrayBuffer ) : string ;
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments