Skip to content

Parsing Bug #18711

Closed
Closed
@ccorcos

Description

@ccorcos

TypeScript Version: 2.5.2

Code

The following code doesn't parse correctly and Typescript thinks f is trying to be a function. This is particularly annoying when Prettier formats my code this way...

const f: (x: any) => any

const x = (
	f([
		() => {
			return 1
		},
		() => {
			return 2
		}
	])
	.catch(error => {
		
	})
)

Example here

Expected behavior:

Actual behavior:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions