bigal 10.0.0-beta3 → 10.0.0-beta4
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/package.json
CHANGED
package/query/WhereQuery.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Entity, NotEntityBrand } from '../Entity';
|
|
|
2
2
|
import type { ExcludeEntityCollections, ExcludeFunctions } from '../types';
|
|
3
3
|
declare type ExcludeUndefined<T> = Exclude<T, undefined>;
|
|
4
4
|
export declare type LiteralValues<TValue> = (ExcludeUndefined<TValue> | null)[] | ExcludeUndefined<TValue> | null;
|
|
5
|
-
export declare type WhereClauseValue<TValue> = TValue extends NotEntityBrand | undefined ? Exclude<TValue, undefined> : Extract<
|
|
5
|
+
export declare type WhereClauseValue<TValue> = TValue extends NotEntityBrand | undefined ? Exclude<TValue, NotEntityBrand | undefined> : Extract<TValue, Entity> extends undefined ? LiteralValues<TValue> : (ExcludeUndefined<Exclude<TValue, Entity>> | null)[] | (Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null)[] | ExcludeUndefined<Exclude<TValue, Entity>> | Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null;
|
|
6
6
|
export declare type StringConstraint<TValue extends string> = {
|
|
7
7
|
[P in 'contains' | 'endsWith' | 'like' | 'startsWith']?: LiteralValues<TValue>;
|
|
8
8
|
};
|
|
@@ -5,5 +5,5 @@ import type { ExcludeFunctions } from './ExcludeFunctions';
|
|
|
5
5
|
* Changes all Entity value properties to Primitive (string|number) | Pick<Entity, 'id'>
|
|
6
6
|
*/
|
|
7
7
|
export declare type CreateUpdateParams<T extends Entity> = {
|
|
8
|
-
[K in keyof T as ExcludeEntityCollections<NonNullable<T[K]>, ExcludeFunctions<T[K], K>>]?: T[K] extends NotEntityBrand | undefined ? T[K] : Extract<T[K], Entity> extends
|
|
8
|
+
[K in keyof T as ExcludeEntityCollections<NonNullable<T[K]>, ExcludeFunctions<T[K], K>>]?: T[K] extends NotEntityBrand | undefined ? T[K] : Extract<T[K], Entity> extends undefined ? T[K] : Exclude<T[K], Entity> | Pick<Extract<T[K], Entity>, 'id'>;
|
|
9
9
|
};
|