@dxtmisha/functional-basic 0.6.0 → 0.6.1

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.
Files changed (120) hide show
  1. package/dist/library.d.ts +4750 -118
  2. package/package.json +1 -1
  3. package/dist/classes/Api.d.ts +0 -161
  4. package/dist/classes/ApiDefault.d.ts +0 -43
  5. package/dist/classes/ApiHeaders.d.ts +0 -23
  6. package/dist/classes/ApiPreparation.d.ts +0 -56
  7. package/dist/classes/ApiResponse.d.ts +0 -111
  8. package/dist/classes/ApiStatus.d.ts +0 -89
  9. package/dist/classes/BroadcastMessage.d.ts +0 -36
  10. package/dist/classes/Cache.d.ts +0 -34
  11. package/dist/classes/CacheItem.d.ts +0 -55
  12. package/dist/classes/CacheStatic.d.ts +0 -17
  13. package/dist/classes/Cookie.d.ts +0 -58
  14. package/dist/classes/CookieBlock.d.ts +0 -22
  15. package/dist/classes/DataStorage.d.ts +0 -82
  16. package/dist/classes/Datetime.d.ts +0 -489
  17. package/dist/classes/EventItem.d.ts +0 -160
  18. package/dist/classes/Geo.d.ts +0 -168
  19. package/dist/classes/GeoFlag.d.ts +0 -79
  20. package/dist/classes/GeoIntl.d.ts +0 -262
  21. package/dist/classes/GeoPhone.d.ts +0 -107
  22. package/dist/classes/Global.d.ts +0 -21
  23. package/dist/classes/Hash.d.ts +0 -59
  24. package/dist/classes/Icons.d.ts +0 -90
  25. package/dist/classes/Loading.d.ts +0 -49
  26. package/dist/classes/Meta.d.ts +0 -168
  27. package/dist/classes/MetaManager.d.ts +0 -103
  28. package/dist/classes/MetaOg.d.ts +0 -101
  29. package/dist/classes/MetaTwitter.d.ts +0 -101
  30. package/dist/classes/ScrollbarWidth.d.ts +0 -33
  31. package/dist/classes/Translate.d.ts +0 -116
  32. package/dist/functions/anyToString.d.ts +0 -7
  33. package/dist/functions/applyTemplate.d.ts +0 -10
  34. package/dist/functions/arrFill.d.ts +0 -8
  35. package/dist/functions/blobToBase64.d.ts +0 -7
  36. package/dist/functions/copyObject.d.ts +0 -8
  37. package/dist/functions/copyObjectLite.d.ts +0 -9
  38. package/dist/functions/createElement.d.ts +0 -13
  39. package/dist/functions/domQuerySelector.d.ts +0 -7
  40. package/dist/functions/domQuerySelectorAll.d.ts +0 -7
  41. package/dist/functions/encodeAttribute.d.ts +0 -7
  42. package/dist/functions/eventStopPropagation.d.ts +0 -7
  43. package/dist/functions/executeFunction.d.ts +0 -8
  44. package/dist/functions/executePromise.d.ts +0 -7
  45. package/dist/functions/forEach.d.ts +0 -11
  46. package/dist/functions/frame.d.ts +0 -16
  47. package/dist/functions/getAttributes.d.ts +0 -8
  48. package/dist/functions/getClipboardData.d.ts +0 -11
  49. package/dist/functions/getColumn.d.ts +0 -10
  50. package/dist/functions/getCurrentDate.d.ts +0 -8
  51. package/dist/functions/getElement.d.ts +0 -8
  52. package/dist/functions/getElementId.d.ts +0 -9
  53. package/dist/functions/getElementImage.d.ts +0 -7
  54. package/dist/functions/getElementItem.d.ts +0 -11
  55. package/dist/functions/getElementOrWindow.d.ts +0 -8
  56. package/dist/functions/getExp.d.ts +0 -13
  57. package/dist/functions/getItemByPath.d.ts +0 -8
  58. package/dist/functions/getKey.d.ts +0 -7
  59. package/dist/functions/getLengthOfAllArray.d.ts +0 -8
  60. package/dist/functions/getMaxLengthAllArray.d.ts +0 -8
  61. package/dist/functions/getMinLengthAllArray.d.ts +0 -8
  62. package/dist/functions/getMouseClient.d.ts +0 -8
  63. package/dist/functions/getMouseClientX.d.ts +0 -7
  64. package/dist/functions/getMouseClientY.d.ts +0 -7
  65. package/dist/functions/getObjectByKeys.d.ts +0 -8
  66. package/dist/functions/getObjectNoUndefined.d.ts +0 -8
  67. package/dist/functions/getObjectOrNone.d.ts +0 -7
  68. package/dist/functions/getRandomText.d.ts +0 -11
  69. package/dist/functions/getRequestString.d.ts +0 -9
  70. package/dist/functions/getStepPercent.d.ts +0 -8
  71. package/dist/functions/getStepValue.d.ts +0 -8
  72. package/dist/functions/goScroll.d.ts +0 -10
  73. package/dist/functions/goScrollSmooth.d.ts +0 -9
  74. package/dist/functions/inArray.d.ts +0 -8
  75. package/dist/functions/initScrollbarOffset.d.ts +0 -6
  76. package/dist/functions/intersectKey.d.ts +0 -8
  77. package/dist/functions/isArray.d.ts +0 -7
  78. package/dist/functions/isDifferent.d.ts +0 -9
  79. package/dist/functions/isDomData.d.ts +0 -6
  80. package/dist/functions/isDomRuntime.d.ts +0 -10
  81. package/dist/functions/isFilled.d.ts +0 -9
  82. package/dist/functions/isFloat.d.ts +0 -7
  83. package/dist/functions/isFunction.d.ts +0 -8
  84. package/dist/functions/isInDom.d.ts +0 -8
  85. package/dist/functions/isIntegerBetween.d.ts +0 -8
  86. package/dist/functions/isNull.d.ts +0 -8
  87. package/dist/functions/isNumber.d.ts +0 -7
  88. package/dist/functions/isObject.d.ts +0 -7
  89. package/dist/functions/isObjectNotArray.d.ts +0 -7
  90. package/dist/functions/isSelected.d.ts +0 -8
  91. package/dist/functions/isSelectedByList.d.ts +0 -8
  92. package/dist/functions/isString.d.ts +0 -7
  93. package/dist/functions/isWindow.d.ts +0 -7
  94. package/dist/functions/random.d.ts +0 -8
  95. package/dist/functions/removeCommonPrefix.d.ts +0 -8
  96. package/dist/functions/replaceRecursive.d.ts +0 -10
  97. package/dist/functions/replaceTemplate.d.ts +0 -9
  98. package/dist/functions/resizeImageByMax.d.ts +0 -18
  99. package/dist/functions/secondToTime.d.ts +0 -7
  100. package/dist/functions/setElementItem.d.ts +0 -10
  101. package/dist/functions/setValues.d.ts +0 -17
  102. package/dist/functions/splice.d.ts +0 -12
  103. package/dist/functions/strFill.d.ts +0 -8
  104. package/dist/functions/toArray.d.ts +0 -17
  105. package/dist/functions/toCamelCase.d.ts +0 -7
  106. package/dist/functions/toCamelCaseFirst.d.ts +0 -7
  107. package/dist/functions/toDate.d.ts +0 -7
  108. package/dist/functions/toKebabCase.d.ts +0 -15
  109. package/dist/functions/toNumber.d.ts +0 -8
  110. package/dist/functions/toNumberByMax.d.ts +0 -9
  111. package/dist/functions/toPercent.d.ts +0 -8
  112. package/dist/functions/toPercentBy100.d.ts +0 -8
  113. package/dist/functions/transformation.d.ts +0 -21
  114. package/dist/functions/uint8ArrayToBase64.d.ts +0 -8
  115. package/dist/functions/uniqueArray.d.ts +0 -7
  116. package/dist/functions/writeClipboardData.d.ts +0 -7
  117. package/dist/types/apiTypes.d.ts +0 -116
  118. package/dist/types/basicTypes.d.ts +0 -126
  119. package/dist/types/geoTypes.d.ts +0 -86
  120. package/dist/types/metaTypes.d.ts +0 -584
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/functional-basic",
3
3
  "private": false,
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "type": "module",
6
6
  "description": "Core functional utility library for modern web development without framework dependencies",
7
7
  "keywords": [
@@ -1,161 +0,0 @@
1
- import { ApiHeaders } from './ApiHeaders';
2
- import { ApiDefault } from './ApiDefault';
3
- import { ApiStatus } from './ApiStatus';
4
- import { ApiResponse } from './ApiResponse';
5
- import { ApiPreparation } from './ApiPreparation';
6
- import { ApiData, ApiFetch, ApiMethodItem, ApiPreparationEnd } from '../types/apiTypes';
7
- /**
8
- * Class for working with requests.
9
- *
10
- * Класс для работы с запросами.
11
- */
12
- export declare class Api {
13
- protected static url: string;
14
- protected static headers: ApiHeaders;
15
- protected static requestDefault: ApiDefault;
16
- protected static status: ApiStatus;
17
- protected static response: ApiResponse;
18
- protected static preparation: ApiPreparation;
19
- /**
20
- * Is the server local.
21
- *
22
- * Является ли сервер локальный.
23
- */
24
- static isLocalhost(): boolean;
25
- /**
26
- * Returns the status of the last request.
27
- *
28
- * Возвращает статус последнего запроса.
29
- */
30
- static getStatus(): ApiStatus;
31
- /**
32
- * Getting the response handler.
33
- *
34
- * Получение обработчика ответа.
35
- */
36
- static getResponse(): ApiResponse;
37
- /**
38
- * Getting the full path to the request script.
39
- *
40
- * Получение полного пути к скрипту запроса.
41
- * @param path path to the script/ путь к скрипту
42
- * @param api adding a path to the site’s API/ добавление пути к API сайта
43
- */
44
- static getUrl(path: string, api?: boolean): string;
45
- /**
46
- * Getting data for the body.
47
- *
48
- * Получение данных для тела.
49
- * @param request this request/ данный запрос
50
- * @param method method for request/ метод запрос
51
- */
52
- static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
53
- /**
54
- * Getting data for the body of the get method.
55
- *
56
- * Получение данных для тела метода get.
57
- * @param request this request/ данный запрос
58
- * @param path path to request/ путь к запрос
59
- * @param method method for request/ метод запрос
60
- */
61
- static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
62
- /**
63
- * Modifies the default header data.
64
- *
65
- * Изменяет данные заголовка по умолчанию.
66
- */
67
- static setHeaders(headers: Record<string, string>): Api;
68
- /**
69
- * Modifies the default request data.
70
- *
71
- * Изменяет данные запроса по умолчанию.
72
- */
73
- static setRequestDefault(request: Record<string, any>): Api;
74
- /**
75
- * Change the base path to the script.
76
- *
77
- * Изменить базовый путь к скрипту.
78
- * @param url path to the script/ путь к скрипту
79
- */
80
- static setUrl(url: string): Api;
81
- /**
82
- * The function is modified for a call before the request.
83
- *
84
- * Изменить функцию перед запросом.
85
- * @param callback function for call/ функция для вызова
86
- */
87
- static setPreparation(callback: () => Promise<void>): Api;
88
- /**
89
- * Modify the function after the request.
90
- *
91
- * Изменить функцию после запроса.
92
- * @param callback function for call/ функция для вызова
93
- */
94
- static setEnd(callback: (query: Response) => Promise<ApiPreparationEnd>): Api;
95
- /**
96
- * To execute a request.
97
- *
98
- * Выполнить запрос.
99
- * @param pathRequest query string or list of parameters/ строка запроса или список параметров
100
- */
101
- static request<T>(pathRequest: string | ApiFetch): Promise<T>;
102
- /**
103
- * Sends a get method request.
104
- *
105
- * Отправляет запрос метода get.
106
- * @param request list of parameters/ список параметров
107
- */
108
- static get<T>(request: ApiFetch): Promise<T>;
109
- /**
110
- * Sends a post method request.
111
- *
112
- * Отправляет запрос метода post.
113
- * @param request list of parameters/ список параметров
114
- */
115
- static post<T>(request: ApiFetch): Promise<T>;
116
- /**
117
- * Sends a put method request.
118
- *
119
- * Отправляет запрос метода put.
120
- * @param request list of parameters/ список параметров
121
- */
122
- static put<T>(request: ApiFetch): Promise<T>;
123
- /**
124
- * Sends a delete method request.
125
- *
126
- * Отправляет запрос метода delete.
127
- * @param request list of parameters/ список параметров
128
- */
129
- static delete<T>(request: ApiFetch): Promise<T>;
130
- /**
131
- * To execute a request.
132
- *
133
- * Выполнить запрос.
134
- * @param apiFetch property of the request/ свойство запроса
135
- */
136
- protected static fetch<T>(apiFetch: ApiFetch): Promise<T>;
137
- /**
138
- * Reading data from the response.
139
- *
140
- * Чтение данных из ответа.
141
- * @param query response from the server/ ответ от сервера
142
- * @param queryReturn custom function for reading data/ кастомная функция для чтения данных
143
- * @param end finalization data/ данные финализации
144
- */
145
- protected static readData(query: Response, queryReturn: ApiFetch['queryReturn'], end: ApiPreparationEnd): Promise<any>;
146
- /**
147
- * Executing the request.
148
- *
149
- * Выполнение запроса.
150
- * @param apiFetch property of the request/ свойство запроса
151
- */
152
- protected static makeQuery(apiFetch: ApiFetch): Promise<Response>;
153
- /**
154
- * Transforms data if needed.
155
- *
156
- * Преобразует данные, если нужно.
157
- * @param data data for transformation/ данные для преобразования
158
- * @param toData is it necessary to process the data/ нужно ли обрабатывать данные
159
- */
160
- protected static makeData<T>(data: ApiData<T>, toData: boolean): T;
161
- }
@@ -1,43 +0,0 @@
1
- import { ApiDefaultValue, ApiFetch } from '../types/apiTypes';
2
- /**
3
- * Class for working with default API request data.
4
- *
5
- * Класс для работы с данными запроса API по умолчанию.
6
- */
7
- export declare class ApiDefault {
8
- /** Default request data/ Данные запроса по умолчанию */
9
- protected value?: ApiDefaultValue;
10
- /**
11
- * Checks if default request data exists.
12
- *
13
- * Проверяет, существуют ли данные запроса по умолчанию.
14
- */
15
- is(): boolean;
16
- /**
17
- * Gets the default request data.
18
- *
19
- * Получает данные запроса по умолчанию.
20
- */
21
- get(): ApiDefaultValue;
22
- /**
23
- * Adds default data to the request.
24
- *
25
- * Добавляет данные по умолчанию к запросу.
26
- * @param request request data/ данные запроса
27
- */
28
- request(request: ApiFetch['request']): ApiFetch['request'];
29
- /**
30
- * Modifies the default request data.
31
- *
32
- * Изменяет данные запроса по умолчанию.
33
- */
34
- set(request: ApiDefaultValue): void;
35
- /**
36
- * Adds default data to FormData request.
37
- *
38
- * Добавляет данные по умолчанию к запросу FormData.
39
- * @param request FormData request/ запрос FormData
40
- * @param value default values/ значения по умолчанию
41
- */
42
- protected addByFormData(request: FormData, value: ApiDefaultValue): void;
43
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * Class for managing HTTP request headers.
3
- *
4
- * Класс для управления заголовками HTTP-запросов.
5
- */
6
- export declare class ApiHeaders {
7
- /** Default headers/ Заголовки по умолчанию */
8
- protected headers: Record<string, string>;
9
- /**
10
- * Getting the header for the request.
11
- *
12
- * Получение заголовка для запроса.
13
- * @param value list of headers/ список заголовков
14
- * @param type type of request/ тип запроса
15
- */
16
- get(value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
17
- /**
18
- * Modifies the default header data.
19
- *
20
- * Изменяет данные заголовка по умолчанию.
21
- */
22
- set(headers: Record<string, string>): this;
23
- }
@@ -1,56 +0,0 @@
1
- import { ApiPreparationEnd } from '../types/apiTypes';
2
- /**
3
- * Class for preparing requests.
4
- *
5
- * Класс для подготовки запросов.
6
- */
7
- export declare class ApiPreparation {
8
- /** Function for call before the request/ Функция для вызова перед запросом */
9
- protected callback?: () => Promise<void>;
10
- /** Function for call after the request/ Функция для вызова после запроса */
11
- protected callbackEnd?: (query: Response) => Promise<ApiPreparationEnd>;
12
- /** Is the preparation in progress/ Идет ли подготовка */
13
- protected loading: boolean;
14
- /**
15
- * Preparation before executing the request.
16
- *
17
- * Подготовка перед выполнением запроса.
18
- * @param active is preparation active/ активна ли подготовка
19
- */
20
- make(active: boolean): Promise<void>;
21
- /**
22
- * Analysis of the request after execution.
23
- *
24
- * Анализ запроса после выполнения.
25
- * @param active is preparation active/ активна ли подготовка
26
- * @param query data received in the request/ данные, полученные в запросе
27
- */
28
- makeEnd(active: boolean, query: Response): Promise<ApiPreparationEnd>;
29
- /**
30
- * The function is modified for a call before the request.
31
- *
32
- * Изменить функцию перед запросом.
33
- * @param callback function for call/ функция для вызова
34
- */
35
- set(callback: () => Promise<void>): this;
36
- /**
37
- * Modify the function after the request.
38
- *
39
- * Изменить функцию после запроса.
40
- * @param callback function for call/ функция для вызова
41
- */
42
- setEnd(callback: (query: Response) => Promise<ApiPreparationEnd>): this;
43
- /**
44
- * To execute preparation.
45
- *
46
- * Выполнить подготовку.
47
- */
48
- protected go(): Promise<void>;
49
- /**
50
- * Analysis of the request after execution.
51
- *
52
- * Анализ запроса после выполнения.
53
- * @param query data received in the request/ данные, полученные в запросе
54
- */
55
- protected end(query: Response): Promise<ApiPreparationEnd>;
56
- }
@@ -1,111 +0,0 @@
1
- import { ApiDefault } from './ApiDefault';
2
- import { ApiFetch, ApiMethod, ApiResponseItem } from '../types/apiTypes';
3
- export declare class ApiResponse {
4
- protected readonly requestDefault: ApiDefault;
5
- /** List of first-time API requests/ Список первичных API запросов */
6
- protected readonly first: ApiResponseItem[];
7
- /** Cached responses/ Кешированные ответы */
8
- protected readonly response: ApiResponseItem[];
9
- /** Loading instance/ Экземпляр загрузки */
10
- protected loading?: any;
11
- /** Developer mode flag/ Флаг режима разработчика */
12
- protected devMode: boolean;
13
- /**
14
- * Constructor
15
- * @param requestDefault default request processor/ процессор запросов по умолчанию
16
- */
17
- constructor(requestDefault: ApiDefault);
18
- /**
19
- * Checks if there is a global cached request, if there is, returns it.
20
- *
21
- * Проверяет, есть ли глобальный кешированный запрос, если есть, возвращает его.
22
- * @param path link to the request/ ссылка на запрос
23
- * @param method request method/ метод запроса
24
- * @param request data for the request/ данные для запроса
25
- * @param devMode is it developer mode/ является ли режим разработчика
26
- */
27
- get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
28
- /**
29
- * Returns a list of data about the emulator.
30
- *
31
- * Возвращает список данных об эмуляторе.
32
- */
33
- getList(): (ApiResponseItem & Record<string, any>)[];
34
- /**
35
- * Adding cached requests.
36
- *
37
- * Добавление кешированных запросов.
38
- * @param response data for caching/ данные для кеширования
39
- */
40
- add(response: ApiResponseItem | ApiResponseItem[]): this;
41
- /**
42
- * Sets developer mode.
43
- *
44
- * Устанавливает режим разработчика.
45
- * @param devMode is it developer mode/ является ли режим разработчика
46
- */
47
- setDevMode(devMode: boolean): this;
48
- /**
49
- * Выполнение эмулятора, если доступно
50
- * @param apiFetch property of the request/ свойство запроса
51
- */
52
- emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
53
- /**
54
- * Checks if the cached item is disabled.
55
- *
56
- * Проверяет, отключен ли кешированный элемент.
57
- * @param item cached item/ кешированный элемент
58
- */
59
- protected isDisable(item: ApiResponseItem): boolean;
60
- /**
61
- * Checks if the path matches the cached one.
62
- *
63
- * Проверяет, совпадает ли путь с кешированным.
64
- * @param item cached item/ кешированный элемент
65
- * @param path request path/ путь запроса
66
- */
67
- protected isPath(item: ApiResponseItem, path: string): boolean;
68
- /**
69
- * Checks if it is developer mode.
70
- *
71
- * Проверяет, является ли режимом разработчика.
72
- * @param devMode is it developer mode/ является ли режим разработчика
73
- */
74
- protected isDevMode(devMode?: boolean): boolean;
75
- /**
76
- * Checks if this is the first request.
77
- *
78
- * Проверяет, является ли это первым запросом.
79
- * @param item cached item/ кешированный элемент
80
- * @param devMode is it developer mode/ является ли режим разработчика
81
- */
82
- protected isFirst(item: ApiResponseItem, devMode?: boolean): boolean;
83
- /**
84
- * Checks if the request matches the cached one.
85
- *
86
- * Проверяет, совпадает ли запрос с кешированным.
87
- * @param item cached item/ кешированный элемент
88
- * @param request request data/ данные запроса
89
- */
90
- protected isResponse(item: ApiResponseItem, request?: ApiFetch['request']): boolean;
91
- /**
92
- * Emulates an execution request.
93
- *
94
- * Эмулирует запрос выполнения.
95
- * @param response Data for pre-request/ Данные для пред-запроса
96
- * @param request data for the request/ данные для запроса
97
- */
98
- protected fetch<T>(response: ApiResponseItem, request?: ApiFetch['request']): Promise<T>;
99
- /**
100
- * Enable loading for request emulation.
101
- *
102
- * Включить загрузку для эмуляции запроса.
103
- */
104
- protected startResponseLoading(): void;
105
- /**
106
- * Disable loading for request emulation.
107
- *
108
- * Отключить загрузку для эмуляции запроса.
109
- */
110
- protected stopResponseLoading(): void;
111
- }
@@ -1,89 +0,0 @@
1
- import { ApiStatusItem } from '../types/apiTypes';
2
- /**
3
- * API status class
4
- *
5
- * Класс статуса API
6
- */
7
- export declare class ApiStatus {
8
- protected value?: ApiStatusItem;
9
- /**
10
- * Last response data
11
- *
12
- * Данные последнего ответа
13
- */
14
- get(): ApiStatusItem;
15
- /**
16
- * Returns the execution status code.
17
- *
18
- * Возвращает код статуса выполнения.
19
- */
20
- getStatus(): number | undefined;
21
- /**
22
- * Returns the execution status text.
23
- *
24
- * Возвращает текст статуса выполнения.
25
- */
26
- getStatusText(): string | undefined;
27
- /**
28
- * Returns the script execution error.
29
- *
30
- * Возвращает ошибку выполнения скрипта.
31
- */
32
- getError(): string | undefined;
33
- /**
34
- * Returns the data of the last request.
35
- *
36
- * Возвращает данные последнего запроса.
37
- */
38
- getResponse<T>(): T | undefined;
39
- /**
40
- * Returns messages from the last request.
41
- *
42
- * Возвращает сообщения от последнего запроса.
43
- */
44
- getMessage(): string;
45
- /**
46
- * Sets the status item data.
47
- *
48
- * Устанавливает данные элемента статуса.
49
- * @param data status item data/ данные элемента статуса
50
- */
51
- set(data: ApiStatusItem): this;
52
- /**
53
- * Sets the status code and optional status text.
54
- *
55
- * Устанавливает код статуса и необязательный текст статуса.
56
- * @param status status code/ код статуса
57
- * @param statusText optional status text/ необязательный текст статуса
58
- */
59
- setStatus(status?: number, statusText?: string): this;
60
- /**
61
- * Sets the error message.
62
- *
63
- * Устанавливает сообщение об ошибке.
64
- * @param error error message/ сообщение об ошибке
65
- */
66
- setError(error?: string): this;
67
- /**
68
- * Sets the data of the last response.
69
- *
70
- * Устанавливает данные последнего ответа.
71
- * @param response response data/ данные ответа
72
- */
73
- setLastResponse(response?: any): this;
74
- /**
75
- * Sets messages from the last request.
76
- *
77
- * Устанавливает сообщения от последнего запроса.
78
- * @param message message text/ текст сообщения
79
- */
80
- setLastMessage(message?: string): this;
81
- /**
82
- * Sets a specific field in the status item.
83
- *
84
- * Устанавливает конкретное поле в элементе статуса.
85
- * @param name field name/ название поля
86
- * @param value field value/ значение поля
87
- */
88
- protected setValue<K extends keyof ApiStatusItem>(name: K, value?: ApiStatusItem[K]): void;
89
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * A class to handle BroadcastChannel messaging.
3
- *
4
- * Класс для работы с сообщениями BroadcastChannel.
5
- */
6
- export declare class BroadcastMessage<Message = any> {
7
- protected callback?: ((event: MessageEvent<Message>) => void) | undefined;
8
- protected channel?: BroadcastChannel;
9
- /**
10
- * Constructor
11
- * @param name channel name/ название канала
12
- * @param callback callback on message received/ колбэк на получение сообщения
13
- */
14
- constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined);
15
- /**
16
- * Send a message to the channel.
17
- *
18
- * Отправить сообщение в канал.
19
- * @param message message to send/ сообщение для отправки
20
- */
21
- post(message: Message): this;
22
- /**
23
- * Set the callback function to be called when a message is received.
24
- *
25
- * Установить функцию колбэка, которая будет вызвана при получении сообщения.
26
- * @param callback callback function/ функция колбэка
27
- */
28
- setCallback(callback: (event: MessageEvent<Message>) => void): this;
29
- /**
30
- * Update state on message received.
31
- *
32
- * Обновление состояния при получении сообщения.
33
- * @param event message event/ событие сообщения
34
- */
35
- protected readonly update: (event: MessageEvent<Message>) => this;
36
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Simple class for caching.
3
- *
4
- * Простой класс для кэширования.
5
- */
6
- export declare class Cache {
7
- private cache;
8
- /**
9
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
10
- *
11
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша.
12
- * @param name cache name/ название кэша
13
- * @param callback function for the cache/ функция для кэша
14
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
15
- */
16
- get<T>(name: string, callback: () => T, comparison?: any[]): T;
17
- /**
18
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache (Async).
19
- *
20
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша (Async).
21
- * @param name cache name/ название кэша
22
- * @param callback function for the cache/ функция для кэша
23
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
24
- */
25
- getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
26
- /**
27
- * Returns an instance of the object for working with the cache element.
28
- *
29
- * Возвращает экземпляр объекта для работы с элементом кэша.
30
- * @param name cache name/ название кэша
31
- * @param callback function for the cache/ функция для кэша
32
- */
33
- private getCacheItem;
34
- }
@@ -1,55 +0,0 @@
1
- /**
2
- * Class for managing a single caching value.
3
- *
4
- * Класс для управления одним значением кэширования.
5
- */
6
- export declare class CacheItem<T> {
7
- private readonly callback;
8
- private cache?;
9
- private cacheOld?;
10
- private comparisons;
11
- /**
12
- * Constructor
13
- * @param callback function for the cache/ функция для кэша
14
- */
15
- constructor(callback: () => T);
16
- /**
17
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
18
- *
19
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша.
20
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
21
- */
22
- getCache(comparison: any[]): T;
23
- /**
24
- * Getting the previous value of the cache.
25
- *
26
- * Получение предыдущего значения кэша.
27
- */
28
- getCacheOld(): T | undefined;
29
- /**
30
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache (Async).
31
- *
32
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша (Async).
33
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
34
- */
35
- getCacheAsync(comparison: any[]): Promise<T>;
36
- /**
37
- * Overwrites or adds new values for the cache.
38
- *
39
- * Перезаписывает или добавляет новые значения для кэша.
40
- */
41
- private setCache;
42
- /**
43
- * Overwrites or adds new values for the cache (Async).
44
- *
45
- * Перезаписывает или добавляет новые значения для кэша (Async).
46
- */
47
- private setCacheAsync;
48
- /**
49
- * Checking additional data.
50
- *
51
- * Проверка дополнительных данных.
52
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
53
- */
54
- private isUpdate;
55
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Class for working with fast cache during code execution.
3
- *
4
- * Класс для работы с быстрым кэшем во время выполнения кода.
5
- */
6
- export declare class CacheStatic {
7
- private static cache;
8
- /**
9
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
10
- *
11
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша.
12
- * @param name cache name/ название кэша
13
- * @param callback function for the cache/ функция для кэша
14
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
15
- */
16
- static get<T>(name: string, callback: () => T, comparison?: any[]): T;
17
- }