{"action":"created","issue":{"url":"https://api.github.com/repos/telegraf/telegraf/issues/606","repository_url":"https://api.github.com/repos/telegraf/telegraf","labels_url":"https://api.github.com/repos/telegraf/telegraf/issues/606/labels{/name}","comments_url":"https://api.github.com/repos/telegraf/telegraf/issues/606/comments","events_url":"https://api.github.com/repos/telegraf/telegraf/issues/606/events","html_url":"https://github.com/telegraf/telegraf/issues/606","id":411513281,"node_id":"MDU6SXNzdWU0MTE1MTMyODE=","number":606,"title":"Typescript and context","user":{"login":"JRakhimov","id":27908126,"node_id":"MDQ6VXNlcjI3OTA4MTI2","avatar_url":"https://avatars0.githubusercontent.com/u/27908126?v=4","gravatar_id":"","url":"https://api.github.com/users/JRakhimov","html_url":"https://github.com/JRakhimov","followers_url":"https://api.github.com/users/JRakhimov/followers","following_url":"https://api.github.com/users/JRakhimov/following{/other_user}","gists_url":"https://api.github.com/users/JRakhimov/gists{/gist_id}","starred_url":"https://api.github.com/users/JRakhimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JRakhimov/subscriptions","organizations_url":"https://api.github.com/users/JRakhimov/orgs","repos_url":"https://api.github.com/users/JRakhimov/repos","events_url":"https://api.github.com/users/JRakhimov/events{/privacy}","received_events_url":"https://api.github.com/users/JRakhimov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-02-18T14:53:23Z","updated_at":"2019-02-19T15:14:01Z","closed_at":"2019-02-19T15:14:01Z","author_association":"NONE","body":"How to extend the context property with typescript?\r\n\r\nIn JS for example I can just write \r\n```javascript\r\n bot.context = someObj;\r\n```"},"comment":{"url":"https://api.github.com/repos/telegraf/telegraf/issues/comments/465170188","html_url":"https://github.com/telegraf/telegraf/issues/606#issuecomment-465170188","issue_url":"https://api.github.com/repos/telegraf/telegraf/issues/606","id":465170188,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NTE3MDE4OA==","user":{"login":"JRakhimov","id":27908126,"node_id":"MDQ6VXNlcjI3OTA4MTI2","avatar_url":"https://avatars0.githubusercontent.com/u/27908126?v=4","gravatar_id":"","url":"https://api.github.com/users/JRakhimov","html_url":"https://github.com/JRakhimov","followers_url":"https://api.github.com/users/JRakhimov/followers","following_url":"https://api.github.com/users/JRakhimov/following{/other_user}","gists_url":"https://api.github.com/users/JRakhimov/gists{/gist_id}","starred_url":"https://api.github.com/users/JRakhimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JRakhimov/subscriptions","organizations_url":"https://api.github.com/users/JRakhimov/orgs","repos_url":"https://api.github.com/users/JRakhimov/repos","events_url":"https://api.github.com/users/JRakhimov/events{/privacy}","received_events_url":"https://api.github.com/users/JRakhimov/received_events","type":"User","site_admin":false},"created_at":"2019-02-19T15:14:01Z","updated_at":"2019-02-19T15:14:01Z","author_association":"NONE","body":"```ts\r\n// index.ts\r\n/// <reference path=\"./types/index.d.ts\" />\r\n\r\nimport Telegraf, { Composer } from 'telegraf';\r\n\r\nconst bot = new Telegraf(process.env.TOKEN');\r\n\r\nbot.context.name = '';\r\n```\r\n\r\n```ts\r\n// index.d.ts\r\nimport { ContextMessageUpdate } from 'telegraf';\r\n\r\ndeclare module 'telegraf/typings' {\r\n  export interface ContextMessageUpdate {\r\n    name: string; // example\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"JRakhimov"}}