@tarojs/runtime 3.6.26-alpha.1 → 3.6.26

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.
@@ -78,7 +78,7 @@ interface MiniTextData {
78
78
  }
79
79
  type MiniData = MiniElementData | MiniTextData;
80
80
  type HydratedData = () => MiniData | MiniData[];
81
- type UpdatePayloadValue = string | boolean | HydratedData | null;
81
+ type UpdatePayloadValue = string | boolean | HydratedData;
82
82
  type DataTree = Record<string, UpdatePayloadValue | ReturnType<HydratedData>>;
83
83
  interface UpdatePayload {
84
84
  path: string;
@@ -420,7 +420,7 @@ declare const nav: typeof window.navigator;
420
420
  declare let now: () => number;
421
421
  // https://gist.github.com/paulirish/1579671
422
422
  // https://gist.github.com/jalbam/5fe05443270fa6d8136238ec72accbc0
423
- declare const _raf: typeof requestAnimationFrame;
423
+ declare const _raf: typeof requestAnimationFrame | ((callback: any) => NodeJS.Timeout);
424
424
  declare const _caf: typeof cancelAnimationFrame;
425
425
  declare class TaroURL {
426
426
  #private;
@@ -478,7 +478,7 @@ declare function parseUrl(url?: string): {
478
478
  declare const URLSearchParams: any;
479
479
  declare class TaroWindow extends Events {
480
480
  navigator: Navigator;
481
- requestAnimationFrame: typeof requestAnimationFrame;
481
+ requestAnimationFrame: typeof requestAnimationFrame | ((callback: any) => NodeJS.Timeout);
482
482
  cancelAnimationFrame: typeof cancelAnimationFrame;
483
483
  getComputedStyle: TGetComputedStyle;
484
484
  Date: DateConstructor;
@@ -490,7 +490,7 @@ declare class TaroWindow extends Events {
490
490
  get document(): TaroDocument;
491
491
  addEventListener(event: string, callback: (arg: any) => void): void;
492
492
  removeEventListener(event: string, callback: (arg: any) => void): void;
493
- setTimeout(...args: Parameters<typeof setTimeout>): number;
493
+ setTimeout(...args: Parameters<typeof setTimeout>): NodeJS.Timeout;
494
494
  clearTimeout(...args: Parameters<typeof clearTimeout>): void;
495
495
  }
496
496
  declare const window: TaroWindow;
@@ -828,8 +828,6 @@ class TaroNode extends TaroEventTarget {
828
828
  }
829
829
  // Data Structure
830
830
  const index = this.findIndex(child);
831
- const isLastChild = index === this.childNodes.length - 1;
832
- const path = child._path;
833
831
  this.childNodes.splice(index, 1);
834
832
  child.parentNode = null;
835
833
  // Set eventSource
@@ -838,15 +836,7 @@ class TaroNode extends TaroEventTarget {
838
836
  }
839
837
  // Serialization
840
838
  if (this._root && doUpdate !== false) {
841
- if (isLastChild) {
842
- this.enqueueUpdate({
843
- path,
844
- value: null
845
- });
846
- }
847
- else {
848
- this.updateChildNodes();
849
- }
839
+ this.updateChildNodes();
850
840
  }
851
841
  return child;
852
842
  }