Skip to content

@types/ember is not used for auto completion #1341

Closed
@mydea

Description

@mydea

I have been wondering for a while why I was not getting any auto complete suggestions for any @ember/... packages in VSCode. After some playing around, I found out that it only seems to provide auto-complete for direct dependencies defined in the package.json file. Since all the ember types are actually provided as sub-dependencies via @ember/types, they are not used. After I replaced @types/ember with the full list from there:

{
        "@types/ember__application": "*",
        "@types/ember__array": "*",
        "@types/ember__component": "*",
        "@types/ember__controller": "*",
        "@types/ember__debug": "*",
        "@types/ember__engine": "*",
        "@types/ember__error": "*",
        "@types/ember__object": "*",
        "@types/ember__polyfills": "*",
        "@types/ember__routing": "*",
        "@types/ember__runloop": "*",
        "@types/ember__service": "*",
        "@types/ember__string": "*",
        "@types/ember__template": "*",
        "@types/ember__test": "*",
        "@types/ember__utils": "*",
        "@types/htmlbars-inline-precompile": "*",
        "@types/jquery": "*",
        "@types/rsvp": "*"
}

(Replacing the stars with actual versions)

Auto complete worked like a charm. For me as a non-TS-expect, that was rather unexpected.

  • As a developer, I want to get autocompletion for ember packages out of the box after installing ember-cli-typescript

Would it make sense to either install these directly instead of @types/ember? It is a bit sub-ideal that it kind of bloats up your package.json, but if this is what is needed for auto-complete I'll gladly take it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions