Skip to content

[5.7-beta][isolatedDeclarations][regression] Missing explicit type annotation false positiveΒ #60192

Closed
@MichaelMitchell-at

Description

@MichaelMitchell-at

πŸ”Ž Search Terms

explicit type annotation false positive isolated declarations

πŸ•— Version & Regression Information

  • This changed between versions 5.6.0 and 5.7.0-beta

⏯ Playground Link

https://www.typescriptlang.org/dev/bug-workbench/?target=7&noCheck=true&isolatedDeclarations=true&emitDeclarationOnly=true&ts=5.7.0-dev.20241010#code/PTAEAEGcBcCcEsDG0Bco4FcCmAoEEATLRAGwENYzp4B7AOzU133DpoGEALYga0dmx4w4LAFt40ACLFylavQDydEgE9+glvEg1y0LAWmkKVWnUjrmwsiRI0A7gClzoAGbXIliJE72AouOghLx87fwk9AgAxeBIsNDIAOgIE6EgcIPAXGKw6MlE40ETUnHhRAAcaWGhQAG8AFRUyrABfV1gaUVAAchcaGi6AbnSsAA8KqtBEehhXPtAAXlAACmhGrAB+NAamgEo0ADcaeAIFgD5a5qGgA

πŸ’» Code

// @strict: true
// @declaration: true
// @noCheck: true
// @emitDeclarationOnly: true
// @isolatedDeclarations: true
// @allowJs: false
// @showEmit
// @showEmittedFile: a.d.ts

import {Type} from 'foo';

export const foo = (type?: Type): void => {};
                    ^^^^^^^^^^^ Parameter must have an explicit type annotation with --isolatedDeclarations.(9011)

πŸ™ Actual behavior

Error even though type annotation exists

πŸ™‚ Expected behavior

No error

Additional information about the issue

Sorry, I don't have time at the moment to bisect to the commit that introduced the regression

Metadata

Metadata

Assignees

Labels

Needs InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions