Skip to content

RegExpMatchArray has lost some compatibility with Array since 2.1.0-dev.20160729 #10041

Closed
@falsandtru

Description

@falsandtru

TypeScript Version: master

Code

(''.match(/ /) || []).map(s => s.toLowerCase());

Expected behavior:

$ node built/local/tsc.js --lib es6 --strictNullChecks index.ts

Actual behavior:

$ node built/local/tsc.js --lib es6 --strictNullChecks index.ts
index.ts(1,1): error TS2349: Cannot invoke an expression whose type lacks a call signature.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions