Skip to content

TS 4.7 syntax regression: ';' expected.Β #48711

Closed
@MichaelMitchell-at

Description

@MichaelMitchell-at

Bug Report

πŸ”Ž Search Terms

typeof syntax missing semicolon generic

πŸ•— Version & Regression Information

This changed between versions 4.6.2 and 4.7.0-beta

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

This is a minimal repro, for a real-world example of a breakage, see https://raw.githubusercontent.com/pmndrs/react-spring/master/packages/types/interpolation.d.ts

interface Example {
  (a: number): typeof a

  <T>(): void
}

πŸ™ Actual behavior

Syntax errors:

Type 'number' has no signatures for which the type argument list is applicable.

Return type of call signature from exported interface has or is using private name 'T'.

';' expected.

πŸ™‚ Expected behavior

No syntax errors

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions