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

Vetur seems to intellisense private properties in d.ts #877

Open
3 tasks done
liuxh0 opened this issue Aug 15, 2018 · 0 comments
Open
3 tasks done

Vetur seems to intellisense private properties in d.ts #877

liuxh0 opened this issue Aug 15, 2018 · 0 comments

Comments

@liuxh0
Copy link

liuxh0 commented Aug 15, 2018

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Windows / Mac
  • Vetur version: 0.12.4 (Windows), 0.12.6 (Mac)
  • VS Code version: 1.19.3

Problem

I have an external library which is written in TypeScript. TS compiler generates .d.ts and .js files. and the entry is index.js.

When using this library, the intellisense suggests me not only public properties and methods but also private. I think vetur does not regard private in .d.ts.

image

Reproducible Case

I wrote a example.ts:

export class Example {
  doPublicly(): void { }
  private doPrivately(): void { }
}

example.js, which is generated by TypeScript compiler:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Example = /** @class */ (function () {
    function Example() {
    }
    Example.prototype.doPublicly = function () { };
    Example.prototype.doPrivately = function () { };
    return Example;
}());
exports.Example = Example;
//# sourceMappingURL=example.js.map

example.d.ts, which is generated by TypeScript compiler:

export declare class Example {
    doPublicly(): void;
    private doPrivately;
}

Note that doPrivately method is marked as a private property.

Finally, I import this module in a vue component:

import { Example } from './example';

If I go to definition, VS Code opens example.d.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants