Skip to content

'Expected N type arguments' position does not skip trivia after '<' #4225

@mds-ant

Description

@mds-ant

Steps to reproduce

Behavior with typescript@6.0

main.ts:2:6 - error TS2558: Expected 1 type arguments, but got 2.

2 f<   string, number>("a");
       ~~~~~~~~~~~~~~

main.ts:4:3 - error TS2558: Expected 1 type arguments, but got 2.

4   string, number>("a");
    ~~~~~~~~~~~~~~

Behavior with tsgo

main.ts:2:3 - error TS2558: Expected 1 type arguments, but got 2.

2 f<   string, number>("a");
    ~~~~~~~~~~~~~~~~~

main.ts:3:3 - error TS2558: Expected 1 type arguments, but got 2.

3 f<

4   string, number>("a");
  ~~~~~~~~~~~~~~~~

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions