File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,9 @@ describe('PathSet', function () {
107107 it ( 'implements iterable, .values, .entries' , function ( ) {
108108 const set = new PathSet ( sampleValues ) ;
109109 expect ( Array . from ( set ) ) . toEqual ( sampleValues ) ;
110- // @ts -expect-error The TypeScript definition of Array.from only accepts Iterable, not Iterator - not sure what's correct here
111- expect ( Array . from < CallNodePath > ( set . values ( ) ) ) . toEqual ( sampleValues ) ;
110+ expect ( Array . from ( set . values ( ) ) ) . toEqual ( sampleValues ) ;
112111
113112 const expectedEntries = sampleValues . map ( ( val ) => [ val , val ] ) ;
114- // @ts -expect-error The TypeScript definition of Array.from only accepts Iterable, not Iterator - not sure what's correct here
115113 expect ( Array . from ( set . entries ( ) ) ) . toEqual ( expectedEntries ) ;
116114 } ) ;
117115} ) ;
Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ export class PathSet implements Iterable<CallNodePath> {
8383 return this . _table . delete ( hashPath ( path ) ) ;
8484 }
8585
86- * values ( ) : Iterator < CallNodePath > {
86+ * values ( ) : IterableIterator < CallNodePath > {
8787 yield * this . _table . values ( ) ;
8888 }
8989
90- * entries ( ) : Iterator < [ CallNodePath , CallNodePath ] > {
90+ * entries ( ) : IterableIterator < [ CallNodePath , CallNodePath ] > {
9191 for ( const entry of this ) {
9292 yield [ entry , entry ] ;
9393 }
You can’t perform that action at this time.
0 commit comments