@sevtech/kit 21.4.1 → 21.5.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.
- package/browser/index.d.ts +109 -4
- package/fesm2022/browser.mjs +346 -5
- package/fesm2022/browser.mjs.map +1 -1
- package/fesm2022/localization.mjs +3 -3
- package/fesm2022/localization.mjs.map +1 -1
- package/fesm2022/ng-misc.mjs +16 -3
- package/fesm2022/ng-misc.mjs.map +1 -1
- package/fesm2022/ui-yoda.mjs +2 -2
- package/fesm2022/ui-yoda.mjs.map +1 -1
- package/misc/index.d.ts +3 -1
- package/ng-misc/index.d.ts +12 -3
- package/package.json +1 -1
package/misc/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ type SafeAny = any;
|
|
|
24
24
|
type MaybeArray<T> = T | T[];
|
|
25
25
|
/** Значение или функция, его возвращающая. Разворачивается через `resolveMaybeFn`. */
|
|
26
26
|
type MaybeFunction<T> = T | (() => T);
|
|
27
|
+
/** Значение или промис с переданным значением. */
|
|
28
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
27
29
|
/** `null | undefined`. */
|
|
28
30
|
type Nil = null | undefined;
|
|
29
31
|
/** «Пустые» значения: `Nil`, пустая строка, пустой массив. */
|
|
@@ -417,4 +419,4 @@ declare function isDefined<T>(data: T): data is Exclude<T, Nil>;
|
|
|
417
419
|
declare const isValidUUID: (data: unknown) => data is `${string}-${string}-${string}-${string}-${string}`;
|
|
418
420
|
|
|
419
421
|
export { clampNumber, coalesce, createMapper, dayRange, guardFactory, isArray, isBoolean, isDefined, isEmptyArray, isEmptyString, isFunction, isHexColor, isHexWithAlpha, isHexWithoutAlpha, isInstance, isNil, isNonEmptyArray, isNonEmptyString, isNumber, isPlainObject, isPromise, isString, isTypeWith, isUndefined, isValidUUID, isWindow, noop, objectEntries, objectKeys, parseJSON, pickKey, randomArrayItem, randomNumber, randomUUID, replaceInterpolation, resolveMaybeFn, roundTo, safeFnCall, safeParseJSON, select, splitPath, toArray, toBoolean, toCssDimension, toPercent };
|
|
420
|
-
export type { CSSColor, CSSDimension, CSSHexColor, CSSRGBColor, CSSSpecialColor, CSSUnits, CamelCase, ConstructorTypeOf, DeepKeys, DeepPartial, DeepRequired, Empty, ExtractType, FoldRenames, ID, MaybeArray, MaybeFunction, Nil, OptionalKeys, PickKey, Primitive, RenameMap, RequiredKeys, SafeAny, SelectResult, SnakeCase, UUID };
|
|
422
|
+
export type { CSSColor, CSSDimension, CSSHexColor, CSSRGBColor, CSSSpecialColor, CSSUnits, CamelCase, ConstructorTypeOf, DeepKeys, DeepPartial, DeepRequired, Empty, ExtractType, FoldRenames, ID, MaybeArray, MaybeFunction, MaybePromise, Nil, OptionalKeys, PickKey, Primitive, RenameMap, RequiredKeys, SafeAny, SelectResult, SnakeCase, UUID };
|
package/ng-misc/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WritableSignal, ComponentRef, OutputRef, QueryList, InputSignalWithTransform, InjectionToken, TemplateRef, ViewContainerRef, Provider, DestroyRef } from '@angular/core';
|
|
2
|
-
import { Observable, Subscriber } from 'rxjs';
|
|
2
|
+
import { Observable, Subscriber, MonoTypeOperatorFunction, OperatorFunction } from 'rxjs';
|
|
3
3
|
import { Route } from '@angular/router';
|
|
4
4
|
import { FormArray, FormControl, FormGroup, FormRecord, AbstractControl, AsyncValidatorFn, ValidatorFn } from '@angular/forms';
|
|
5
5
|
import { NgComponentOutlet } from '@angular/common';
|
|
@@ -71,7 +71,7 @@ declare function htmlBooleanAttribute(value: unknown): true | undefined;
|
|
|
71
71
|
*/
|
|
72
72
|
declare function dateAttribute(value: unknown, fallbackValue?: Date | null): Date | null;
|
|
73
73
|
|
|
74
|
-
/** Синхронное или асинхронное значение: `T | Observable<T> | Promise<T>`. */
|
|
74
|
+
/** Синхронное или асинхронное значение: `T | Observable<T> | Promise<T>`. Разворачивается через `fromMaybeAsync`. */
|
|
75
75
|
type MaybeAsync<T> = T | Observable<T> | Promise<T>;
|
|
76
76
|
/**
|
|
77
77
|
* Извлекает тип значения из `Observable`, `Subscriber` или `Promise`.
|
|
@@ -203,5 +203,14 @@ interface RevalidateOnOptions {
|
|
|
203
203
|
*/
|
|
204
204
|
declare function revalidateOn(source: AbstractControl | Observable<unknown>, targets: MaybeArray<AbstractControl>, options?: RevalidateOnOptions): void;
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Приводит значение, промис или `Observable` к `Observable`.
|
|
208
|
+
* Значение эмитится синхронно, промис — после разрешения, `Observable` возвращается как есть.
|
|
209
|
+
*/
|
|
210
|
+
declare function fromMaybeAsync<T>(value: MaybeAsync<T>): Observable<T>;
|
|
211
|
+
/** Обрабатывает ошибку потока, заменяя его на `EMPTY` или `fallback`. */
|
|
212
|
+
declare function safeCatchError<T>(): MonoTypeOperatorFunction<T>;
|
|
213
|
+
declare function safeCatchError<T, R>(fallback: R): OperatorFunction<T, T | R>;
|
|
214
|
+
|
|
215
|
+
export { collectFeatureProviders, dateAttribute, defineKitFeature, fromMaybeAsync, htmlBooleanAttribute, ifAsyncValidator, ifValidator, isComponentOutlet, isComponentRef, isFormArray, isFormControl, isFormGroup, isFormRecord, isTemplateRef, isViewContainer, linkedQueryParam, resizeObservable, resolveConfigProviders, revalidateOn, safeCatchError };
|
|
207
216
|
export type { DataRoute, DataRoutes, ExtractAsync, ExtractComponentRef, ExtractFormArray, ExtractFormControl, ExtractFormGroup, ExtractFormRecord, ExtractOutputs, ExtractQueryList, ExtractSignalInputs, ExtractTokenType, KitFeature, LinkedQueryParamOptions, MaybeAsync, RevalidateOnOptions };
|