Skip to content

In JS, object is treated as 'any' #25624

Open
@ghost

Description

TypeScript Version: 3.0.0-dev.20180711

Code

/** @typedef {object} T */
/** @type {T} */
const x = 0;

Expected behavior:

Error at x: 0 is not an object.

Actual behavior:

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureDomain: JSDocRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptSuggestionAn idea for TypeScriptcheckJsRelates to checking JavaScript using TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions