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

Use Typescript to lint JSDoc annotations #986

Merged
merged 2 commits into from Oct 10, 2017

Conversation

JoelEinbinder
Copy link
Collaborator

@JoelEinbinder JoelEinbinder commented Oct 10, 2017

A re-upload of #219 from my new repository.

#65

@@ -116,7 +116,7 @@ class NetworkManager extends EventEmitter {
response = 'ProvideCredentials';
this._attemptedAuthentications.add(event.interceptionId);
}
const {username, password} = this._credentials || {};
const {username, password} = this._credentials || {username: undefined, password: undefined};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think it will help more than hurt.

npm-debug.log Outdated
@@ -0,0 +1,48 @@
0 info it worked if it ends with ok

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to check in npm-debug.log?

@aslushnikov
Copy link
Contributor

Awwwwsome.

Could you please minimize the diff (there are a lot of unnecessary changes like "!" added/removed). And it's good to go.

Also, npm-debug is not needed.

@aslushnikov aslushnikov merged commit e59172d into puppeteer:master Oct 10, 2017
this._map = new Map();
}

/**
* @param {K} key
* @param {V} value
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoelEinbinder just curious... TSC didn't need these annotations? And how did you know they were unnecessary ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a bug in typescript. microsoft/TypeScript#18135

@stereobooster
Copy link

As soon as annotations are "compatible" with typescript it should be easy to generate TS definitions from JSDoc with something like this:

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

Successfully merging this pull request may close these issues.

None yet

5 participants