Skip to content

nightly: Array.concat doesn't accept any[] #10479

@alexeagle

Description

@alexeagle

TypeScript Version: nightly ( 2.1.0-dev.20160822)

Code

With --strictNullChecks

// A *self-contained* demonstration of the problem follows...

let arg: any[] = [""];
let rootNodesOrAppElements = [].concat(arg);

I get

 ./node_modules/.bin/tsc
t.ts(3,40): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'.
  Type 'any' is not assignable to type 'never'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions