Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support diagnostics references from TypeScript #54102

Closed
mjbvz opened this issue Jul 11, 2018 · 2 comments
Closed

Support diagnostics references from TypeScript #54102

mjbvz opened this issue Jul 11, 2018 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-found Issue verification failed
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jul 11, 2018

Tracks the VS Code side support for microsoft/TypeScript#25257

This feature adds related information on some diagnostics

@mjbvz mjbvz added this to the July 2018 milestone Jul 11, 2018
@mjbvz mjbvz self-assigned this Jul 11, 2018
@mjbvz mjbvz added feature-request Request for new features or functionality typescript Typescript support issues javascript JavaScript support issues labels Jul 11, 2018
@mjbvz mjbvz closed this as completed Jul 11, 2018
@sbatten sbatten added the verification-needed Verification of issue is requested label Aug 1, 2018
@JacksonKearl JacksonKearl added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Aug 1, 2018
@JacksonKearl
Copy link
Contributor

I was only able to get this to trigger on use before declaration, I think there should be more trigger, based on the related issue on the TS side. @mjbvz this was my file:

import * as express from 'express'

let a: unknown = {}

let ob = {
    'aaa': 1,
    'bbb': 2
}

let b: number = a // nothing for incompatible assignment

let c = express(); // nothing for calling CommonJS import (this was the big screenshot in the linked issue)

ob.aab = 4 // nothing for "did you mean"

r = 4; // does trigger:  "r is declared here: ..."
let r: number;

@JacksonKearl JacksonKearl reopened this Aug 1, 2018
@JacksonKearl JacksonKearl added verification-found Issue verification failed and removed verified Verification succeeded labels Aug 1, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented Aug 2, 2018

I confirmed that feature does the right thing on our side. Here are the followups from your example:

  1. Opened No related error spans return for type assignment mismatch TypeScript#26145 for this
  2. Not sure why this would is error since the @types typings do indicate that the exported namespace is a function. Will follow up to see if this is expected or not
  3. Does show up if you make the name slightly longer: aaab. TS is a bit conservative with 'did you mean' checks. Will open another issue for this

@mjbvz mjbvz closed this as completed Aug 2, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-found Issue verification failed
Projects
None yet
Development

No branches or pull requests

3 participants