seroval 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,26 +96,6 @@ export default class CrossSerializerContext extends BaseSerializerContext {
96
96
  return GLOBAL_CONTEXT_API + '.' + GLOBAL_CONTEXT_STREAM_CLOSE + '(' + this.getRefParam(node.i) + ')';
97
97
  }
98
98
 
99
- protected serializeAsyncIteratorFactory(node: SerovalAsyncIteratorFactoryNode): string {
100
- return this.assignIndexedValue(
101
- node.i,
102
- this.createFunction(
103
- ['s'],
104
- this.createFunction(
105
- ['b', 't'],
106
- '(b=s.tee(),s=b[0],b=b[1].getReader(),t={[' + this.serialize(node.f) + ']:' + this.createFunction([], 't') + ','
107
- + 'next:' + this.createFunction(
108
- [],
109
- 'b.read().then(' + this.createEffectfulFunction(
110
- ['d'],
111
- 'if(d.done)return{done:!0,value:void 0};d=d.value;if(d[0]===1)throw d[1];return{done:d[0]===2,value:d[1]}',
112
- ) + ')',
113
- ) + '})',
114
- ),
115
- ),
116
- );
117
- }
118
-
119
99
  serializeTop(tree: SerovalNode): string {
120
100
  const result = this.serialize(tree);
121
101
  const id = tree.i;
package/src/core/types.ts CHANGED
@@ -411,6 +411,7 @@ export interface SerovalIteratorFactoryInstanceNode extends SerovalBaseNode {
411
411
  export interface SerovalAsyncIteratorFactoryNode extends SerovalBaseNode {
412
412
  t: SerovalNodeType.AsyncIteratorFactory;
413
413
  i: number;
414
+ s: 0 | 1;
414
415
  f: SerovalNode;
415
416
  }
416
417