{"action":"created","issue":{"url":"https://api.github.com/repos/eggjs/egg/issues/3036","repository_url":"https://api.github.com/repos/eggjs/egg","labels_url":"https://api.github.com/repos/eggjs/egg/issues/3036/labels{/name}","comments_url":"https://api.github.com/repos/eggjs/egg/issues/3036/comments","events_url":"https://api.github.com/repos/eggjs/egg/issues/3036/events","html_url":"https://github.com/eggjs/egg/issues/3036","id":362867469,"node_id":"MDU6SXNzdWUzNjI4Njc0Njk=","number":3036,"title":"egg-cors index.d.ts 缺少设置","user":{"login":"callmez","id":1625891,"node_id":"MDQ6VXNlcjE2MjU4OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1625891?v=4","gravatar_id":"","url":"https://api.github.com/users/callmez","html_url":"https://github.com/callmez","followers_url":"https://api.github.com/users/callmez/followers","following_url":"https://api.github.com/users/callmez/following{/other_user}","gists_url":"https://api.github.com/users/callmez/gists{/gist_id}","starred_url":"https://api.github.com/users/callmez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callmez/subscriptions","organizations_url":"https://api.github.com/users/callmez/orgs","repos_url":"https://api.github.com/users/callmez/repos","events_url":"https://api.github.com/users/callmez/events{/privacy}","received_events_url":"https://api.github.com/users/callmez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-22T15:48:20Z","updated_at":"2018-09-24T03:12:11Z","closed_at":null,"author_association":"NONE","body":"```js\r\nexport interface EggAppConfig {\r\n    cors: {\r\n      origin: string | (() => string);\r\n      allowMethods: string | string[];\r\n      credentials: boolean; // 缺少\r\n    };\r\n  }\r\n```\r\n\r\n在使用egg-ts时总是有些不顺畅部分,\r\n像egg-cors这种缺少设置的总是, 不管在`typings/index.d.ts`中设置还是在`config.default.ts`中设置都不能实现declaration-merging. \r\n`typings/index.d.ts`\r\n```js\r\ndeclare module 'egg' {\r\n  export interface EggAppConfig {\r\n    cors: {\r\n      origin: string | (() => string);\r\n      allowMethods: string | string[];\r\n      credentials: boolean;\r\n    };\r\n  }\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/eggjs/egg/issues/comments/423869327","html_url":"https://github.com/eggjs/egg/issues/3036#issuecomment-423869327","issue_url":"https://api.github.com/repos/eggjs/egg/issues/3036","id":423869327,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzg2OTMyNw==","user":{"login":"Maledong","id":40081831,"node_id":"MDQ6VXNlcjQwMDgxODMx","avatar_url":"https://avatars0.githubusercontent.com/u/40081831?v=4","gravatar_id":"","url":"https://api.github.com/users/Maledong","html_url":"https://github.com/Maledong","followers_url":"https://api.github.com/users/Maledong/followers","following_url":"https://api.github.com/users/Maledong/following{/other_user}","gists_url":"https://api.github.com/users/Maledong/gists{/gist_id}","starred_url":"https://api.github.com/users/Maledong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maledong/subscriptions","organizations_url":"https://api.github.com/users/Maledong/orgs","repos_url":"https://api.github.com/users/Maledong/repos","events_url":"https://api.github.com/users/Maledong/events{/privacy}","received_events_url":"https://api.github.com/users/Maledong/received_events","type":"User","site_admin":false},"created_at":"2018-09-24T03:12:11Z","updated_at":"2018-09-24T03:12:11Z","author_association":"MEMBER","body":"@callmez ：谢谢你，我这里注明了。准备把文档写清楚。"}}
{"actor":{"display_login":"Maledong"}}