{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4942","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4942/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4942/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4942/events","html_url":"https://github.com/Microsoft/TypeScript/issues/4942","id":107974756,"number":4942,"title":"More granular CanvasRenderingContext2D style typing","user":{"login":"dylanscott","id":491393,"avatar_url":"https://avatars.githubusercontent.com/u/491393?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanscott","html_url":"https://github.com/dylanscott","followers_url":"https://api.github.com/users/dylanscott/followers","following_url":"https://api.github.com/users/dylanscott/following{/other_user}","gists_url":"https://api.github.com/users/dylanscott/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanscott/subscriptions","organizations_url":"https://api.github.com/users/dylanscott/orgs","repos_url":"https://api.github.com/users/dylanscott/repos","events_url":"https://api.github.com/users/dylanscott/events{/privacy}","received_events_url":"https://api.github.com/users/dylanscott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-23T18:06:30Z","updated_at":"2015-09-23T18:06:30Z","closed_at":null,"body":"I noticed that the typing for [`CanvasRenderingContext2D`](https://github.com/Microsoft/TypeScript/blob/master/lib/lib.d.ts#L5109) has the `fillStyle` and `strokeStyle` properties typed as `any`. The [Canvas 2D context specification](http://www.w3.org/TR/2dcontext/#fill-and-stroke-styles) seems to suggest that this type could be narrowed to `string | CanvasGradient | CanvasPattern`. I'm not sure if the type was kept at `any` for a specific reason or if perhaps it just hadn't been updated since union types were introduced, but I'm happy to submit a PR if this would be a reasonable change."}}