-
Notifications
You must be signed in to change notification settings - Fork 12.8k
lib.es6.d.ts is missing a method for CanvasRenderingContext2D interface #19195
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
Comments
PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes. |
I don't understand this response? I'm NOT contributing! I'm only trying to
point out that your .d.ts files are broken, and causing many errors during
my compile. None of the Typescript .d.ts files are complete with respect
to the canvasContext2D specification specifically relating to Path2D. There
are several omissions.
…On Mon, Oct 16, 2017 at 1:24 PM, Mohamed Hegazy ***@***.***> wrote:
More docs at: https://html.spec.whatwg.org/multipage/canvas.html#dom-
context-2d-fill
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADIHw9uY_byXr-zD_xVFm6jwl5yDvKoaks5ss5FIgaJpZM4P57VV>
.
|
Is anyone taking any responsibility for the quality of this language? The
Path2D issue in all .d.ts files has been known and ignored since December
2015 ...
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjV15_8gvjWAhUBZyYKHYU_Am4QFggnMAA&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F34109921%2Fusing-path2d-in-a-typescript-project-is-not-resolved&usg=AOvVaw3AQecd8K3O5RuFJCetHmtq
I really don't understand the offer for me to fix .d.ts files? Does this
mean anyone can modify the core .d.ts files? If so, it is no wonder that
they are full of errors and omissions?
…On Tue, Oct 17, 2017 at 11:45 AM, Ryan Cavanaugh ***@***.***> wrote:
@nhrones <https://github.com/nhrones> we agree the definition files are
incomplete. @mhegazy <https://github.com/mhegazy> was outlining the
process for contributing a fix for anyone who was interested in doing so.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADIHw752TkruKpovffcImCBO9y8_JKnKks5stMu3gaJpZM4P57VV>
.
|
Why is software unfinished? Why do bugs exist? What has caused our resources to be woefully finite? Is imperfection our curse, or our penance? These questions exist, but until the hour of reckoning, the answers are shrouded from our view. |
So ... what you're telling me is 'it is best to avoid Typescript until the
team gets more resources!'
Message received .. you can close this issue.
…On Tue, Oct 17, 2017 at 1:39 PM, Ryan Cavanaugh ***@***.***> wrote:
Why is software unfinished? Why do bugs exist? What has caused our
resources to be woefully finite? Is imperfection our curse, or our penance?
These questions exist, but until the hour of reckoning, the answers are
shrouded from our view.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADIHwxl5xV4Rtgzd3qSkaSY9Q51xto85ks5stOY2gaJpZM4P57VV>
.
|
Okay. Looks like you came up with a fix in Typescript 2.6. |
Reopening since this does need to get fixed - thanks for raising it. We'll fix it with the next round of DOM updates or hopefully someone can contribute a fix. |
Thanks, I keep updating my local declaration files, but each vs-code update replaces them. I used to know how to include an extension.d.ts, but the method to do this has changed so many times that I can't get any local files recognized. I don't use node_modules, and it looks like that is where code looks now?
|
The easiest way to prevent that is to have a local file that augments the existing definition: interface CanvasRenderingContext2D {
clip(path: Path2D, fillRule?: CanvasFillRule): void;
fill(path: Path2D, fillRule?: CanvasFillRule): void;
isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
isPointInStroke(path: Path2D, x: number, y: number): boolean;
} Note that this file needs to not be a module (i.e. have top-level |
That is a method I've used in the past. Now, I can't seem to find any combination of file location/ tsconfig.json settings that work any longer. As it is, the files that I've modified in the vscode location <C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib> generate many compile errors during the build task, but these errors 'clear' automatically as the cursor lands on the line with the error. Very strange behavior indeed. From what I've read, It may be related to the fact that my UI projects don't have any node_modules or package.json file. I do have several node file-server/socket-server projects that have no issues at all. |
I placed the globalfixes.d.ts file in ./src and now compile errors are gone. Thanks |
lib.es6.d.ts is missing a 'fill' method for CanvasRenderingContext2D that takes a 'Path2D'
Please add the following to the CanvasRenderingContext2D interface:
fill(path: Path2D, fillRule?: CanvasFillRule): void
The text was updated successfully, but these errors were encountered: