dolphindb 2.0.937 → 2.0.939

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.
package/browser.d.ts CHANGED
@@ -180,12 +180,12 @@ DdbObj[] | // any
180
180
  DdbSymbolExtendedValue | DdbArrayVectorValue | DdbDecimal32VectorValue | DdbDecimal64VectorValue;
181
181
  export type DdbValue = DdbScalarValue | DdbVectorValue | DdbMatrixValue | DdbDictValue | DdbChartValue;
182
182
  export type DdbStringObj = DdbObj<string>;
183
- export type DdbVectorObj = DdbObj<DdbVectorValue>;
183
+ export type DdbVectorObj<TValue extends DdbVectorValue = DdbVectorValue> = DdbObj<TValue>;
184
184
  export type DdbVectorAnyObj = DdbObj<DdbObj[]>;
185
185
  export type DdbVectorStringObj = DdbObj<string[]>;
186
186
  export type DdbTableObj<TColumns extends DdbVectorObj[] = DdbVectorObj[]> = DdbObj<TColumns>;
187
- export type DdbDictObj = DdbObj<[DdbVectorObj, DdbVectorObj]>;
188
- export type DdbMatrixObj = DdbObj<DdbMatrixValue>;
187
+ export type DdbDictObj<TKeys extends DdbVectorObj = DdbVectorObj, TValues extends DdbVectorObj = DdbVectorObj> = DdbObj<[TKeys, TValues]>;
188
+ export type DdbMatrixObj<TValue extends DdbMatrixValue = DdbMatrixValue> = DdbObj<TValue>;
189
189
  export type DdbChartObj = DdbObj<DdbChartValue>;
190
190
  export declare const nulls: {
191
191
  readonly int8: -128;
package/browser.js CHANGED
@@ -2643,7 +2643,8 @@ export class DDB {
2643
2643
  };
2644
2644
  // 先准备好收到 websocket message 的 callback
2645
2645
  this.on_message = buffer => {
2646
- let { streaming } = this;
2646
+ // 复制一份,避免 handler 中异步直接使用传入的 streaming 这个对象时属性发生变化
2647
+ let streaming = { ...this.streaming, error: null };
2647
2648
  try {
2648
2649
  const dv = new DataView(buffer);
2649
2650
  const buf = new Uint8Array(buffer);