Skip to content

No type-checking for @property with misspelled type across files #37040

Closed
@ghost

Description

TypeScript Version: 3.9.0-dev.20200225

Code

a.js

/**
 * @typedef MyType
 * @property {sting} [x]
 */

/** @param {MyType} p  */
export function f(p) {}

b.js

import {f} from "./a.js"
f({ x: 42 })

Expected behavior:

Error at sting.

Actual behavior:

No error.
There is an error if we call f({ x: 42 }) in a.js.

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