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

Critical change from the [email protected] #46

Closed
samchon opened this issue Nov 25, 2021 · 0 comments
Closed

Critical change from the [email protected] #46

samchon opened this issue Nov 25, 2021 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@samchon
Copy link
Owner

samchon commented Nov 25, 2021

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]>>];
@samchon samchon added bug Something isn't working enhancement New feature or request labels Nov 25, 2021
@samchon samchon self-assigned this Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant