Skip to content

Incorrect any displayed in type with noErrorTruncation: trueΒ #62032

Open
@typeholes

Description

@typeholes

πŸ”Ž Search Terms

noErrorTruncation

πŸ•— Version & Regression Information

  • This changed between versions 5.8.3 and 5.9 beta

⏯ Playground Link

https://www.typescriptlang.org/play/?noErrorTruncation=true&ts=5.9.0-dev.20250709#code/C4TwDgpgBAKlC8UDaAoKUCMAaATFgzFgCxYCsWAbFgOxYAcWAnFgAxZqa4HFmU31NW7dNjyES5KrQbM2HUdwl9pguSK7jeUgbOGcxPSfxlD5Gw8p2n1BpdpNr9ircdV6Fmoyt1nbL79ZOnpYO7uZ2rj42zl5Wjh4W9m6+MSHJ0cFJUVAA5ADOwACWADbFUADmAPaVACY5WLkAdpUA7lDAAE4Aro0AxgCGRY3lOSgAuihAA

πŸ’» Code

type T = [
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  1,2,3,4,5,6,7,8,9,0,
  'still good', 'now truncating'
]
// type shows any in hover in place of 'still good'  this is where the elision would be without noErrorTruncation

πŸ™ Actual behavior

type shows any where the elision would have been without noErrorTruncation.

πŸ™‚ Expected behavior

full type is shown.

Additional information about the issue

This is only in the display. type checking behaves correctly and indexing to that position shows the correct type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions