File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 174174 },
175175 "devDependencies" : {
176176 "@types/varint" : " ^6.0.0" ,
177- "aegir" : " ^37.9.1 " ,
177+ "aegir" : " ^38.1.0 " ,
178178 "sinon" : " ^15.0.0" ,
179179 "util" : " ^0.12.3"
180180 },
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export function stringToStringTuples (str: string): string[][] {
2121
2222 if ( proto . size === 0 ) {
2323 tuples . push ( [ part ] )
24+ // eslint-disable-next-line no-continue
2425 continue
2526 }
2627
@@ -33,7 +34,7 @@ export function stringToStringTuples (str: string): string[][] {
3334 if ( proto . path === true ) {
3435 tuples . push ( [
3536 part ,
36- // TODO: should we need to check each path part to see if it's a proto?
37+ // should we need to check each path part to see if it's a proto?
3738 // This would allow for other protocols to be added after a unix path,
3839 // however it would have issues if the path had a protocol name in the path
3940 cleanPath ( parts . slice ( p ) . join ( '/' ) )
@@ -139,6 +140,7 @@ export function bytesToTuples (buf: Uint8Array): Tuple[] {
139140 if ( size === 0 ) {
140141 tuples . push ( [ code ] )
141142 i += n
143+ // eslint-disable-next-line no-continue
142144 continue
143145 }
144146
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ function mb2bytes (mbstr: string): Uint8Array {
175175 const size = Uint8Array . from ( varint . encode ( mb . length ) )
176176 return uint8ArrayConcat ( [ size , mb ] , size . length + mb . length )
177177}
178- function bytes2mb ( buf : Uint8Array ) {
178+ function bytes2mb ( buf : Uint8Array ) : string {
179179 const size = varint . decode ( buf )
180180 const hash = buf . slice ( varint . decode . bytes )
181181
Original file line number Diff line number Diff line change @@ -510,15 +510,15 @@ class DefaultMultiaddr implements Multiaddr {
510510 }
511511 }
512512
513- toString ( ) {
513+ toString ( ) : string {
514514 if ( this . #string == null ) {
515515 this . #string = codec . bytesToString ( this . bytes )
516516 }
517517
518518 return this . #string
519519 }
520520
521- toJSON ( ) {
521+ toJSON ( ) : string {
522522 return this . toString ( )
523523 }
524524
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export const toBytes = function (ip: string): Uint8Array {
6767}
6868
6969// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63
70- export const toString = function ( buf : Uint8Array , offset : number = 0 , length ?: number ) {
70+ export const toString = function ( buf : Uint8Array , offset : number = 0 , length ?: number ) : string {
7171 offset = ~ ~ offset
7272 length = length ?? ( buf . length - offset )
7373
You can’t perform that action at this time.
0 commit comments