@@ -139,18 +139,17 @@ export function __asyncGenerator(thisArg, _arguments, generator) {
139
139
function verb ( n ) { return function ( v ) { return new Promise ( function ( a , b ) { q . push ( [ n , v , a , b ] ) , next ( ) ; } ) ; } ; }
140
140
function next ( ) { if ( ! c && q . length ) resume ( ( c = q . shift ( ) ) [ 0 ] , c [ 1 ] ) ; }
141
141
function resume ( n , v ) { try { step ( g [ n ] ( v ) ) ; } catch ( e ) { settle ( c [ 3 ] , e ) ; } }
142
- function step ( r ) { r . done ? settle ( c [ 2 ] , r ) : Promise . resolve ( r . value [ 1 ] ) . then ( r . value [ 0 ] === "yield" ? _yield : r . value [ 0 ] === "delegate" ? delegate : fulfill , reject ) ; }
143
- function _yield ( value ) { settle ( c [ 2 ] , { value : value , done : false } ) ; }
144
- function delegate ( r ) { step ( r . done ? r : { value : [ "yield" , r . value ] , done : false } ) ; }
142
+ function step ( r ) { r . done ? settle ( c [ 2 ] , r ) : Promise . resolve ( r . value [ 1 ] ) . then ( r . value [ 0 ] === "yield" ? send : fulfill , reject ) ; }
143
+ function send ( value ) { settle ( c [ 2 ] , { value : value , done : false } ) ; }
145
144
function fulfill ( value ) { resume ( "next" , value ) ; }
146
145
function reject ( value ) { resume ( "throw" , value ) ; }
147
146
function settle ( f , v ) { c = void 0 , f ( v ) , next ( ) ; }
148
147
} ;
149
148
150
149
export function __asyncDelegator ( o ) {
151
- var i = { next : verb ( "next" ) , "throw" : verb ( "throw" , function ( e ) { throw e ; } ) , "return" : verb ( "return" , function ( v ) { return { value : v , done : true } ; } ) } ;
150
+ var i = { next : verb ( "next" ) , "throw" : verb ( "throw" , function ( e ) { throw e ; } ) , "return" : verb ( "return" , function ( v ) { return { value : v , done : true } ; } ) } , p ;
152
151
return o = __asyncValues ( o ) , i [ Symbol . iterator ] = function ( ) { return this ; } , i ;
153
- function verb ( n , f ) { return function ( v ) { return { value : [ "delegate ", ( o [ n ] || f ) . call ( o , v ) ] , done : false } ; } ; }
152
+ function verb ( n , f ) { return function ( v ) { return v = p && n === "throw" ? f ( v ) : p && v . done ? v : { value : p ? [ "yield ", v . value ] : [ "await" , ( o [ n ] || f ) . call ( o , v ) ] , done : false } , p = ! p , v ; } ; }
154
153
} ;
155
154
156
155
export function __asyncValues ( o ) {
0 commit comments