Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(ts-estree): align typeArguments and typeParameters across nodes#223

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JamesHenry merged 1 commit intotypescript-eslint:masterfromarmano2:type-arguments-parameters
Feb 7, 2019
Merged

fix(ts-estree): align typeArguments and typeParameters across nodes#223

JamesHenry merged 1 commit intotypescript-eslint:masterfromarmano2:type-arguments-parameters
Feb 7, 2019

Conversation

armano2
Copy link
Collaborator

This PR alignstypeParameters andtypeArguments across all nodes

fixes:#220

@armano2armano2 self-assigned thisFeb 6, 2019
@codecov
Copy link

codecovbot commentedFeb 6, 2019

Codecov Report

Merging#223 intomaster willincrease coverage by0.08%.
The diff coverage is100%.

@@            Coverage Diff             @@##           master     #223      +/-   ##==========================================+ Coverage   96.57%   96.65%   +0.08%==========================================  Files          51       51                Lines        2455     2455                Branches      370      370              ==========================================+ Hits         2371     2373       +2+ Misses         42       41       -1+ Partials       42       41       -1
Impacted FilesCoverage Δ
packages/typescript-estree/src/convert.ts97.57% <100%> (+0.3%)⬆️

@bradzacher
Copy link
Member

bradzacher commentedFeb 6, 2019
edited
Loading

I was wondering after looking at#222 - why do we have so many optional properties on the AST?
Wouldn't it be better for us to use empty arrays instead of just not setting a prop at all?

I can understand an optional field in the case of interface -> implements where it's not "supposed" to be there.
But like in the case of type parameters/arguments/annotations; wouldn't it be better for us to just set an empty array to save the plugin (and consumers) from doing undefined checks?

@armano2
Copy link
CollaboratorAuthor

armano2 commentedFeb 6, 2019
edited
Loading

those nodes does no contain undefined arrays
TSTypeParameterDeclaration andTSTypeParameterInstantiation used fortypeArguments andtypeParameters contain in range<> tokens and they have array ofparams

TSTypeAnnotation contains in range: or=>

this is useful for setting up comments in AST, and without that there is no easy way to determine if comment is/* test */< /* test */ string /* test */> /* test */ before/after or within<>

bradzacher reacted with thumbs up emoji

Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

LGTM

@JamesHenryJamesHenry merged commit3306198 intotypescript-eslint:masterFeb 7, 2019
@armano2armano2 deleted the type-arguments-parameters branchFebruary 7, 2019 01:26
kaicataldo pushed a commit to kaicataldo/typescript-eslint that referenced this pull requestAug 27, 2019
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 21, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

@JamesHenryJamesHenryAwaiting requested review from JamesHenry

Assignees

@armano2armano2

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Incosistent AST for typeArgument and typeParameters
3 participants
@armano2@bradzacher@JamesHenry

[8]ページ先頭

©2009-2025 Movatter.jp