diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index b182da2d088..84dfbb4e128 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -1,3 +1,8 @@ +## From 35.x to 36 + +- **macros**: `getStateArrayMapFunc` has been removed. Inline the equivalent where needed, e.g. `arr.map((item) => (item && item.isA ? item.getState() : item))`. + + ## From 34.x to 35 - **vtkMapper**: mappers should overwrite `computeBounds()` instead of `getBounds` that now calls `computeBounds()` before returning a copy of the mapper bounds. diff --git a/Sources/macros.d.ts b/Sources/macros.d.ts index eff6b6236cf..f583300ca31 100644 --- a/Sources/macros.d.ts +++ b/Sources/macros.d.ts @@ -140,13 +140,6 @@ declare function safeArrays(model: object): void; */ declare function enumToString(e: object, value: any): string; -/** - * If item is a VtkObject, return its getState() otherwise return itself. - * - * @param item object to extract its state from - */ -declare function getStateArrayMapFunc(item: any): any; - /** * Call provided function on the next EDT pass * @@ -725,7 +718,6 @@ declare const Macro: { get: typeof get; getArray: typeof getArray; getCurrentGlobalMTime(): Number; - getStateArrayMapFunc: typeof getStateArrayMapFunc; isVtkObject: typeof isVtkObject; keystore: typeof keystore; measurePromiseExecution: typeof measurePromiseExecution; diff --git a/Sources/macros.js b/Sources/macros.js index 4c2852aae30..8e8db6f6077 100644 --- a/Sources/macros.js +++ b/Sources/macros.js @@ -212,13 +212,6 @@ function enumToString(e, value) { return Object.keys(e).find((key) => e[key] === value); } -function getStateArrayMapFunc(item) { - if (item && item.isA) { - return item.getState(); - } - return item; -} - // ---------------------------------------------------------------------------- // setImmediate // ---------------------------------------------------------------------------- @@ -1797,7 +1790,6 @@ export default { get, getArray, getCurrentGlobalMTime, - getStateArrayMapFunc, isVtkObject, keystore, measurePromiseExecution,