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

Canvas createPattern type #1808

Open
utenma opened this issue Sep 24, 2024 · 1 comment
Open

Canvas createPattern type #1808

utenma opened this issue Sep 24, 2024 · 1 comment

Comments

@utenma
Copy link

utenma commented Sep 24, 2024

createPattern arg repetition type is widened to string

however According to MDN should be "repeat" | "repeat-x" | "repeat-y" | "no-repeat"

location in repo
https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/main/baselines/dom.generated.d.ts#L5747

current signature

createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;

expected signature

type PatternRepeatMode = "repeat" | "repeat-x" | "repeat-y" | "no-repeat"

createPattern(image: CanvasImageSource, repetition: PatternRepeatMode | null): CanvasPattern | null;
@utenma utenma changed the title Canvas createPattern PatternRepeatMode tyoe Canvas createPattern type Sep 24, 2024
@HolgerJeromin
Copy link
Contributor

Just to make the issue clear:
Currently we have this in current master.

createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;

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