@mikro-orm/core 7.0.0-dev.142 → 7.0.0-dev.143

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.142",
4
+ "version": "7.0.0-dev.143",
5
5
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
package/typings.d.ts CHANGED
@@ -115,6 +115,7 @@ export type IPrimaryKey<T extends IPrimaryKeyValue = IPrimaryKeyValue> = T;
115
115
  export type Scalar = boolean | number | string | bigint | symbol | Date | RegExp | Uint8Array | {
116
116
  toHexString(): string;
117
117
  };
118
+ type Primitive = boolean | number | string | bigint | symbol;
118
119
  export type ExpandScalar<T> = null | (T extends string ? T | RegExp : T extends Date ? Date | string : T extends bigint ? bigint | string | number : T);
119
120
  export type OperatorMap<T> = {
120
121
  $and?: ExpandQuery<T>[];
@@ -291,7 +292,7 @@ export type Ref<T> = T extends any ? IsAny<T> extends true ? Reference<T & objec
291
292
  type ExtractHiddenProps<T> = (T extends {
292
293
  [HiddenProps]?: infer K;
293
294
  } ? K : never) | ({
294
- [K in keyof T]: T[K] extends Hidden ? K : never;
295
+ [K in keyof T]: T[K] extends Primitive ? (T[K] extends Hidden ? K : never) : never;
295
296
  }[keyof T] & {});
296
297
  type ExcludeHidden<T, K extends keyof T> = K extends ExtractHiddenProps<T> ? never : K;
297
298
  type ExtractConfig<T> = T extends {
package/utils/Utils.js CHANGED
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
123
123
  }
124
124
  export class Utils {
125
125
  static PK_SEPARATOR = '~~~';
126
- static #ORM_VERSION = '7.0.0-dev.142';
126
+ static #ORM_VERSION = '7.0.0-dev.143';
127
127
  /**
128
128
  * Checks if the argument is instance of `Object`. Returns false for arrays.
129
129
  */