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

Critical change from the [email protected] #46

@samchon

Description

@samchon

https://github.com/samchon/safe-typeorm/actions/runs/1502087692

After updating TypeScript version from @4.4 to @4.5, compilation error has been occured.

However, I can't find any related information from the TypeScript release note. I assume that meta programming type checker of the TypeScript has been enhanced by another issue (Tail-Recursion Elimination on Conditional Types) and such enhancement caused upper errors - microsoft/TypeScript#45711

Thus, I should enhance all of the generic object parameters who're referenced by the SpecialFields like below:

//----
// BEFORE
//----
export function getWhereArguments<
        T extends object, 
        Literal extends SpecialFields<T, Field>>
    (
        creator: Creator<T>,
        fieldLike: `${Literal}` | `${string}.${Literal}`,
        param: Field.MemberType<T, Literal> | null
    ): [string, Record<string, Field.ValueType<T[Literal]>>];

//----
// AFTER
//----
export function getWhereArguments<
        T extends { [P in Literal]: Field; }, 
        Literal extends SpecialFields<T, Field>>
    (
        creator: Creator<T>,
        fieldLike: `${Literal}` | `${string}.${Literal}`,
        param: Field.MemberType<T, Literal> | null
    ): [string, Record<string, Field.ValueType<T[Literal]>>];

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions