Skip to content

Can't resolve method call with constructor without parenthesis #932

@MaxGraey

Description

@MaxGraey
const arr = new Uint8Array(2).fill(1);

output:

ERROR TS2349: Cannot invoke an expression whose type lacks a call signature. Type '~lib/typedarray/Uint8Array' has no compatible call signatures.

But with parenthesis works:

const arr = (new Uint8Array(2)).fill(1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions