{"action":"created","issue":{"url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/133","repository_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus","labels_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/133/comments","events_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/133/events","html_url":"https://github.com/feathers-plus/generator-feathers-plus/pull/133","id":386910352,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1NTE5MjM0","number":133,"title":"import and use App interface in src/index.ts","user":{"login":"ucokfm","id":1414833,"node_id":"MDQ6VXNlcjE0MTQ4MzM=","avatar_url":"https://avatars1.githubusercontent.com/u/1414833?v=4","gravatar_id":"","url":"https://api.github.com/users/ucokfm","html_url":"https://github.com/ucokfm","followers_url":"https://api.github.com/users/ucokfm/followers","following_url":"https://api.github.com/users/ucokfm/following{/other_user}","gists_url":"https://api.github.com/users/ucokfm/gists{/gist_id}","starred_url":"https://api.github.com/users/ucokfm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucokfm/subscriptions","organizations_url":"https://api.github.com/users/ucokfm/orgs","repos_url":"https://api.github.com/users/ucokfm/repos","events_url":"https://api.github.com/users/ucokfm/events{/privacy}","received_events_url":"https://api.github.com/users/ucokfm/received_events","type":"User","site_admin":false},"labels":[{"id":1129084175,"node_id":"MDU6TGFiZWwxMTI5MDg0MTc1","url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/labels/j2l4e","name":"j2l4e","color":"e6fc97","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-12-03T16:55:17Z","updated_at":"2018-12-04T01:05:36Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/pulls/133","html_url":"https://github.com/feathers-plus/generator-feathers-plus/pull/133","diff_url":"https://github.com/feathers-plus/generator-feathers-plus/pull/133.diff","patch_url":"https://github.com/feathers-plus/generator-feathers-plus/pull/133.patch"},"body":"I'm using typescript mode and enable seed data option.\r\n\r\nAfter generate authentication, VS Code will highlight \"await seedData(app)\" line and give this error message:\r\n```\r\n[ts]\r\nArgument of type 'Application<object>' is not assignable to parameter of type 'Application<{ 'users': User; }>'.\r\n  Type 'Application<object>' is not assignable to type 'Application<{ 'users': User; }>'.\r\n```\r\n\r\nBy type casting the app variable with App interface, the error doesn't show up."},"comment":{"url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/comments/443930492","html_url":"https://github.com/feathers-plus/generator-feathers-plus/pull/133#issuecomment-443930492","issue_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/133","id":443930492,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzkzMDQ5Mg==","user":{"login":"ucokfm","id":1414833,"node_id":"MDQ6VXNlcjE0MTQ4MzM=","avatar_url":"https://avatars1.githubusercontent.com/u/1414833?v=4","gravatar_id":"","url":"https://api.github.com/users/ucokfm","html_url":"https://github.com/ucokfm","followers_url":"https://api.github.com/users/ucokfm/followers","following_url":"https://api.github.com/users/ucokfm/following{/other_user}","gists_url":"https://api.github.com/users/ucokfm/gists{/gist_id}","starred_url":"https://api.github.com/users/ucokfm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucokfm/subscriptions","organizations_url":"https://api.github.com/users/ucokfm/orgs","repos_url":"https://api.github.com/users/ucokfm/repos","events_url":"https://api.github.com/users/ucokfm/events{/privacy}","received_events_url":"https://api.github.com/users/ucokfm/received_events","type":"User","site_admin":false},"created_at":"2018-12-04T01:05:36Z","updated_at":"2018-12-04T01:05:36Z","author_association":"NONE","body":"> The cause of this is: #118\r\n> \r\n> I don't think this is the right fix. I think instead you should.pull in the interface into app.ts and type the default export as the app interface, which will avoid any issues like this in the future.\r\n\r\nYes, i think that's better solution. So can i write like this in app.ts?\r\n```\r\nexport default moduleExports as App;\r\n```\r\nor do the type casting when declaring app variable?\r\n```\r\nconst app = express(feathers()) as App;\r\n```"}}
{"actor":{"display_login":"ucokfm"}}