File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @microcode/pathtree" ,
3- "version" : " 0.2.3 " ,
3+ "version" : " 0.3.0 " ,
44 "description" : " Fast search tree for arbitrary paths" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ export interface IPathNode {
1313
1414 attachToParent ( parent : IPathNode ) : void ;
1515
16- data : any | null ;
16+ data ?: unknown ;
1717}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export class PathNode implements IPathNode {
1111 private _isWildcard = false ;
1212 private _isLeaf = false ;
1313
14- private _data : any | null = null ;
14+ private _data ?: unknown = undefined ;
1515
1616 constructor ( key : string ) {
1717 this . _key = key ;
@@ -45,11 +45,11 @@ export class PathNode implements IPathNode {
4545 this . _isLeaf = v ;
4646 }
4747
48- get data ( ) : any {
48+ get data ( ) : unknown | undefined {
4949 return this . _data ;
5050 }
5151
52- set data ( data : any ) {
52+ set data ( data : unknown | undefined ) {
5353 if ( ! this . isLeaf ) {
5454 throw new Error ( "Cannot store data in non-leaf node" ) ;
5555 }
You can’t perform that action at this time.
0 commit comments