From 678b788b32ac4a42c1e9254d63069a86aed452fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BA=D0=B0=D1=80=D0=BE=D0=B2?= Date: Tue, 29 Apr 2025 13:38:39 +0300 Subject: [PATCH 1/2] getCollection docs --- API/common.md | 5 +++-- API/scripts.om.d.ts | 2 +- changelog.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/API/common.md b/API/common.md index 82d87b4..2ef60db 100644 --- a/API/common.md +++ b/API/common.md @@ -747,10 +747,11 @@ get(longId: number): EntityInfo | null;   + ```js -getCollection(longId: number[]): EntityInfo[]; +getCollection(longId: number[]): (EntityInfo | null)[]; ``` -Возвращает массив сущностей [`EntityInfo`](#entity-info) по массиву их [`longId`](#long-id). Корректно работает, только если все переданные `longId` корректные (существуют в модели). Иначе возвращает массив меньшей размерности. Использовать с осторожностью. Порядок возвращаемых сущностей `EntityInfo` может отличаться от порядка переданных `longId`. +Возвращает массив сущностей [`EntityInfo`](#entity-info) параллельный массиву их [`longId`](#long-id). Если сущность не найдена, на её месте будет возвращён `null`.   diff --git a/API/scripts.om.d.ts b/API/scripts.om.d.ts index 498db23..2091dbb 100644 --- a/API/scripts.om.d.ts +++ b/API/scripts.om.d.ts @@ -783,7 +783,7 @@ export interface ResultInfo { export interface EntitiesInfo { get(longId: number): EntityInfo | null; - getCollection(longId: number[]): EntityInfo[]; + getCollection(longId: number[]): (EntityInfo | null)[]; } export interface CopyData { diff --git a/changelog.md b/changelog.md index cab1b0a..c73930e 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,7 @@ | Дата релиза | Тег релиза | Версия ScriptAPI | Версии MiddleWork | Версия приложения | Изменения | | --- | --- | --- | --- | --- | --- | -| xx.xx.xxxx | [v9.300](https://github.com/optimacros/scripts_documentation/tree/v9.300) | — | | | | +| xx.xx.xxxx | [v9.300](https://github.com/optimacros/scripts_documentation/tree/v9.300) | — | | | | | 24.03.2025 | [v9.300](https://github.com/optimacros/scripts_documentation/tree/v9.300) | — | | | | | 16.12.2024 | [v9.?00.x.x](https://github.com/optimacros/scripts_documentation/tree/v9.?00.x.x) | — | | | | | 15.11.2024 | [9.200.x.13](https://github.com/optimacros/scripts_documentation/tree/v9.200.x.13) | — | | | | From 76c47af110f96812deb8927e48739d7aea7ded44 Mon Sep 17 00:00:00 2001 From: mgolovkina Date: Thu, 19 Jun 2025 22:56:03 +0700 Subject: [PATCH 2/2] Small corrections after review --- API/common.md | 2 +- changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/API/common.md b/API/common.md index e058088..ec9f705 100644 --- a/API/common.md +++ b/API/common.md @@ -751,7 +751,7 @@ get(longId: number): EntityInfo | null; ```js getCollection(longId: number[]): (EntityInfo | null)[]; ``` -Возвращает массив сущностей [`EntityInfo`](#entity-info) параллельный массиву их [`longId`](#long-id). Если сущность не найдена, на её месте будет возвращён `null`. +Возвращает массив сущностей [`EntityInfo`](#entity-info), параллельный массиву их [`longId`](#long-id). Если сущность не найдена, на её месте будет возвращёно значение `null`.   diff --git a/changelog.md b/changelog.md index c73930e..5e9da48 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,7 @@ | Дата релиза | Тег релиза | Версия ScriptAPI | Версии MiddleWork | Версия приложения | Изменения | | --- | --- | --- | --- | --- | --- | -| xx.xx.xxxx | [v9.300](https://github.com/optimacros/scripts_documentation/tree/v9.300) | — | | | | +| xx.xx.xxxx | [v9.300](https://github.com/optimacros/scripts_documentation/tree/v9.300) | — | | | | | 24.03.2025 | [v9.300](https://github.com/optimacros/scripts_documentation/tree/v9.300) | — | | | | | 16.12.2024 | [v9.?00.x.x](https://github.com/optimacros/scripts_documentation/tree/v9.?00.x.x) | — | | | | | 15.11.2024 | [9.200.x.13](https://github.com/optimacros/scripts_documentation/tree/v9.200.x.13) | — | | | |