Skip to content

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

Open

Description

@maxdewald

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[] }

Activity

  1. changed the title [-]`Objects.Update` | Incorrect type on nested array update[/-] [+]`Objects.Update` | Incorrect type if value is replaced by array[/+] on Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions