Skip to content

Nameless @typedef has implicit any error on the associated identifier #36375

Closed
@TimvdLippe

Description

@TimvdLippe

TypeScript Version: 3.7.5

Search Terms: typedef, jsdoc, noImplicitAny

Code

/**
 * @typedef {!{data: number}}
 */
export let EventTargetEvent;

Expected behavior:
No error when compiling with noImplicitAny

Actual behavior:
Variable 'EventTargetEvent' implicitly has an 'any' type.
Playground Link: https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=2&pc=22#code/PQKhCgAIUgBAXAngBwKYBNUDNIG8CEu6AhvMQFyQB2ArgLYBGqATgL6tQjDioAeyAe2bxIAG1QiAogDdUVeABVizAOYSZc+AG4gA

Related Issues: Originally discussed with @sandersn in #19983 who requested a separate issue

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptWorking as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions