@joint/core 4.2.2 → 4.2.3

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.
@@ -315,7 +315,7 @@ const isSymbol = (value) => {
315
315
 
316
316
  const initCloneArray = (array) => {
317
317
  const length = array.length;
318
- let result = new array.constructor(length);
318
+ const result = new array.constructor(length);
319
319
 
320
320
  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
321
321
  result.index = array.index;
@@ -538,7 +538,7 @@ const baseIsEqual = (value, other, stack) => {
538
538
  };
539
539
 
540
540
  const baseIsEqualDeep = (object, other, equalFunc, stack) => {
541
- let objIsArr = Array.isArray(object);
541
+ const objIsArr = Array.isArray(object);
542
542
  const othIsArr = Array.isArray(other);
543
543
  let objTag = objIsArr ? arrayTag : getTag(object);
544
544
  let othTag = othIsArr ? arrayTag : getTag(other);
@@ -546,7 +546,7 @@ const baseIsEqualDeep = (object, other, equalFunc, stack) => {
546
546
  objTag = objTag == argsTag ? objectTag : objTag;
547
547
  othTag = othTag == argsTag ? objectTag : othTag;
548
548
 
549
- let objIsObj = objTag == objectTag;
549
+ const objIsObj = objTag == objectTag;
550
550
  const othIsObj = othTag == objectTag;
551
551
  const isSameTag = objTag == othTag;
552
552
 
@@ -710,7 +710,7 @@ const equalByTag = (object, other, tag, equalFunc, stack) => {
710
710
 
711
711
  const mapToArray = (map) => {
712
712
  let index = -1;
713
- let result = Array(map.size);
713
+ const result = Array(map.size);
714
714
 
715
715
  map.forEach((value, key) => {
716
716
  result[++index] = [key, value];
@@ -852,7 +852,7 @@ const diff = (array, values) => {
852
852
  }
853
853
 
854
854
  outer:
855
- for (let key in array) {
855
+ for (const key in array) {
856
856
  let value = array[key];
857
857
  const computed = value;
858
858
 
package/types/joint.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { g } from './geometry';
2
- import { Vectorizer } from './vectorizer';
1
+ import type { g } from './geometry';
2
+ import type { Vectorizer } from './vectorizer';
3
3
 
4
4
  export const version: string;
5
5
 
@@ -1668,8 +1668,8 @@ export namespace dia {
1668
1668
  moveThreshold?: number;
1669
1669
  magnetThreshold?: number | string;
1670
1670
  // views
1671
- elementView?: typeof ElementView | ((element: Element) => typeof ElementView);
1672
- linkView?: typeof LinkView | ((link: Link) => typeof LinkView);
1671
+ elementView?: typeof ElementView<any> | ((element: Element) => typeof ElementView<any> | null | undefined);
1672
+ linkView?: typeof LinkView<any> | ((link: Link) => typeof LinkView<any> | null | undefined);
1673
1673
  measureNode?: MeasureNodeCallback;
1674
1674
  // embedding
1675
1675
  embeddingMode?: boolean;
@@ -3241,6 +3241,7 @@ export namespace util {
3241
3241
 
3242
3242
  export function toArray(value: any): any[];
3243
3243
 
3244
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
3244
3245
  export function debounce<T extends Function>(func: T, wait?: number, options?: { leading?: boolean, maxWait?: number, trailing?: boolean }): T & Cancelable;
3245
3246
 
3246
3247
  export function groupBy(collection: Collection, iteratee?: IterateeFunction<any>): object;
@@ -1,4 +1,4 @@
1
- import { g } from './geometry';
1
+ import type { g } from './geometry';
2
2
 
3
3
  export const V: VCallable;
4
4
  export type V = VElement;