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

fix setLineDash parameter name: value -> segments #74

Merged
merged 1 commit into from
Feb 7, 2021

Conversation

milahu
Copy link
Contributor

@milahu milahu commented Dec 20, 2020

use the same parameter name as in typescript/lib/lib.dom.d.ts

interface CanvasPathDrawingStyles {
    // ....
    setLineDash(segments: number[]): void;
}

so we can auto-generate interfaces as shown here

@jtenner
Copy link
Collaborator

jtenner commented Dec 21, 2020

I'm actually not opposed to this change. LGTM. I need to fix CI however.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling cdb6a23 on milahu:patch-1 into c4d1fb2 on hustcc:master.

Copy link
Collaborator

@jtenner jtenner left a comment

Choose a reason for hiding this comment

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

Thank you! I will merge this pull request soon.

@milahu
Copy link
Contributor Author

milahu commented Dec 21, 2020

same problem with parameters width and height

in typescript/lib/lib.dom.d.ts these appear only as w and h
for example on methods rect or clearRect

can we change these too?
so the typescript/lib/lib.dom.d.ts interface is our single source of truth

edit: mozilla MDN says

void ctx.rect(x, y, width, height);

microsoft typescript says

rect(x: number, y: number, w: number, h: number): void;

but im still voting for consistency with the typescript interface

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.

4 participants