chore: upgrade moduleResolution to Node16 (#9269)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export * from "./apply-searchable"
|
||||
export * from "./build-indexes"
|
||||
export * from "./create-big-number-properties"
|
||||
export * from "./create-default-properties"
|
||||
export * from "./define-property"
|
||||
export * from "./define-relationship"
|
||||
export * from "./parse-entity-name"
|
||||
export * from "./query-builder"
|
||||
@@ -1,3 +1,6 @@
|
||||
export * from "./entity-builder"
|
||||
export * from "./entity"
|
||||
export * from "./helpers/entity-builder/index"
|
||||
export * from "./helpers/create-mikro-orm-entity"
|
||||
export * from "./relations/index"
|
||||
export * from "./properties/index"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export * from "./array"
|
||||
export * from "./base"
|
||||
export * from "./big-number"
|
||||
export * from "./boolean"
|
||||
export * from "./date-time"
|
||||
export * from "./enum"
|
||||
export * from "./id"
|
||||
export * from "./json"
|
||||
export * from "./nullable"
|
||||
export * from "./number"
|
||||
export * from "./primary-key"
|
||||
export * from "./text"
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BaseRelationship } from "./base"
|
||||
import { NullableModifier } from "./nullable"
|
||||
import { RelationNullableModifier } from "./nullable"
|
||||
|
||||
export class BelongsTo<T> extends BaseRelationship<T> {
|
||||
type = "belongsTo" as const
|
||||
@@ -12,6 +12,6 @@ export class BelongsTo<T> extends BaseRelationship<T> {
|
||||
* Apply nullable modifier on the schema
|
||||
*/
|
||||
nullable() {
|
||||
return new NullableModifier<T, BelongsTo<T>>(this)
|
||||
return new RelationNullableModifier<T, BelongsTo<T>>(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BaseRelationship } from "./base"
|
||||
import { NullableModifier } from "./nullable"
|
||||
import { RelationNullableModifier } from "./nullable"
|
||||
|
||||
/**
|
||||
* HasOne relationship defines a relationship between two entities
|
||||
@@ -22,6 +22,6 @@ export class HasOne<T> extends BaseRelationship<T> {
|
||||
* Apply nullable modifier on the schema
|
||||
*/
|
||||
nullable() {
|
||||
return new NullableModifier<T, HasOne<T>>(this)
|
||||
return new RelationNullableModifier<T, HasOne<T>>(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from "./base"
|
||||
export * from "./belongs-to"
|
||||
export * from "./has-many"
|
||||
export * from "./has-one"
|
||||
export * from "./many-to-many"
|
||||
export * from "./nullable"
|
||||
@@ -6,7 +6,7 @@ const IsNullableModifier = Symbol.for("isNullableModifier")
|
||||
/**
|
||||
* Nullable modifier marks a schema node as nullable
|
||||
*/
|
||||
export class NullableModifier<T, Relation extends RelationshipType<T>>
|
||||
export class RelationNullableModifier<T, Relation extends RelationshipType<T>>
|
||||
implements RelationshipType<T | null>
|
||||
{
|
||||
[IsNullableModifier]: true = true;
|
||||
@@ -14,7 +14,7 @@ export class NullableModifier<T, Relation extends RelationshipType<T>>
|
||||
|
||||
static isNullableModifier<T>(
|
||||
modifier: any
|
||||
): modifier is NullableModifier<T, any> {
|
||||
): modifier is RelationNullableModifier<T, any> {
|
||||
return !!modifier?.[IsNullableModifier]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user