Skip to content

JS type argument defaulting should give implicit 'any' error #25609

Description

TypeScript Version: 3.0.0-dev.20180711

Code

tsconfig.json

{
"compilerOptions": {
"strict": true,
"allowJs": true,
"checkJs": true
}
}

a.js

/** * @template T * @return {T} */functionf(){returnx;}constx=f();

Expected behavior:

Error somewhere that x is implicitly any.

Actual behavior:

No error.

Metadata

Metadata

Labels

BugA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedDomain: JSDocRelates to JSDoc parsing and type generationcheckJsRelates to checking JavaScript using TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions