Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Close #72, let Has.ManyToMany can accept Belongs.OneToOne accessor #73

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "safe-typeorm",
"version": "1.0.14",
"version": "1.0.15",
"description": "Make TypeORM much safer",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions src/decorators/internal/HasManyToMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ClosureProxy } from "../base/ClosureProxy";
import { ReflectAdaptor } from "../base/ReflectAdaptor";
import { RelationshipVariable } from "../base/RelationshipVariable";
import { get_primary_field } from "../base/get_primary_field";
import { BelongsOneToOne } from "./BelongsOneToOne";

/**
* Type for a variable using the `Has.ManyToMany` decorator.
Expand Down Expand Up @@ -50,8 +51,8 @@ export function HasManyToMany<
(
target: Creator.Generator<Target>,
router: Creator.Generator<Router>,
targetInverse: (router: Router) => BelongsManyToOne<Target, any>,
myInverse: (router: Router) => BelongsManyToOne<Mine, any>,
targetInverse: (router: Router) => BelongsManyToOne<Target, any> | BelongsOneToOne<Target, any>,
myInverse: (router: Router) => BelongsManyToOne<Mine, any> | BelongsOneToOne<Target, any>,
comparator?: Comparator<HasManyToMany.ITuple<Target, Router>>
): PropertyDecorator
{
Expand Down