Skip to content

How to have autocompletion? #169

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

Closed
grant opened this issue May 18, 2020 · 7 comments
Closed

How to have autocompletion? #169

grant opened this issue May 18, 2020 · 7 comments

Comments

@grant
Copy link
Member

grant commented May 18, 2020

We need fantastic IDE documentation with inline documentation.

import {CloudEvent} from 'cloudevents/v1';
const ce = new CloudEvent();
ce.

image

This requires #65

@lance
Copy link
Member

lance commented May 18, 2020

@grant can you show more of the code here? How are you creating ce?

@grant
Copy link
Member Author

grant commented May 18, 2020

const ce = new CloudEvent();

Is how you create the ce. Doesn't really matter what's in the CloudEvent class.

@lance
Copy link
Member

lance commented May 18, 2020

So, I guess I'm not clear on what should change, because this is possible today. Am I missing something?

image

@grant
Copy link
Member Author

grant commented May 18, 2020

This is what I see in my editor (VS Code) after following the Usage section of the README:

Screen Shot 2020-05-18 at 16 54 44

Maybe the module isn't updated on npm, but I'd expect to see the experience you're getting when developing locally. I don't want to memorize the CloudEvent properties of course.


In the above picture, it looks like we're using typescript types (: any, :CloudEvent), which is good.

@lance
Copy link
Member

lance commented May 19, 2020

No, the module is not published on npm with these changes yet. You should try from master.

@grant
Copy link
Member Author

grant commented May 19, 2020

No, the module is not published on npm with these changes yet. You should try from master.

OK. Got it. I'll keep this issue open until we publish to npm then. A user can't really build all npm dependencies from source of course.

@lance
Copy link
Member

lance commented May 27, 2020

2.0.0 released today, including type definitions.

@lance lance closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants