Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects.Update | Incorrect type if value is replaced by array #83

Open
Maggi64 opened this issue Mar 27, 2023 · 0 comments
Open

Objects.Update | Incorrect type if value is replaced by array #83

Maggi64 opened this issue Mar 27, 2023 · 0 comments

Comments

@Maggi64
Copy link

Maggi64 commented Mar 27, 2023

Reproduction:
type T1 = Call<Objects.Update<'a[0]', 4>, { a: 1 }>;

Output:

type T1 = {
    a: {
        toString: ((radix?: number | undefined) => string) & (() => string);
        toFixed: (fractionDigits?: number | undefined) => string;
        toExponential: (fractionDigits?: number | undefined) => string;
        toPrecision: (precision?: number | undefined) => string;
        valueOf: (() => number) & (() => Object);
        toLocaleString: {
            ...;
        } & (() => string);
        0: number;
    };
}

Expected:

type T1 = { a: number[] }
@Maggi64 Maggi64 changed the title Objects.Update | Incorrect type on nested array update Objects.Update | Incorrect type if value is replaced by array Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant