{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2249","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2249/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2249/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2249/events","html_url":"https://github.com/facebook/flow/issues/2249","id":171081914,"number":2249,"title":"Constructor cannot be called on XY","user":{"login":"stephanos","id":159852,"avatar_url":"https://avatars.githubusercontent.com/u/159852?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanos","html_url":"https://github.com/stephanos","followers_url":"https://api.github.com/users/stephanos/followers","following_url":"https://api.github.com/users/stephanos/following{/other_user}","gists_url":"https://api.github.com/users/stephanos/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanos/subscriptions","organizations_url":"https://api.github.com/users/stephanos/orgs","repos_url":"https://api.github.com/users/stephanos/repos","events_url":"https://api.github.com/users/stephanos/events{/privacy}","received_events_url":"https://api.github.com/users/stephanos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/Needs%20docs","name":"Needs docs","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-14T22:17:22Z","updated_at":"2016-09-12T12:53:45Z","closed_at":null,"body":"Hey there,\r\n\r\nI'm desperately trying to integrate `nedb` into my project and have it type checked. But I just don't get it.\r\n\r\nThis is the code:\r\n\r\n```\r\nimport Datastore from 'nedb';\r\n...\r\ndb = new Datastore();\r\n```\r\n\r\nThis is my declaration file:\r\n\r\n```\r\ndeclare module 'nedb' {\r\n  declare class Datastore {\r\n    constructor(): void;\r\n  }\r\n\r\n  declare module.exports: Datastore;\r\n}\r\n```\r\n\r\nand the error message is:\r\n\r\n```\r\n 18:     this.db = new Datastore();\r\n                   ^^^^^^^^^^^^^^^ constructor call. Constructor cannot be called on\r\n  18:     this.db = new Datastore();\r\n                       ^^^^^^^^^ Datastore\r\n```\r\n\r\nI couldn't really find anything helpful in the documentation.\r\n\r\nCan you please give me some pointers?"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/246337759","html_url":"https://github.com/facebook/flow/issues/2249#issuecomment-246337759","issue_url":"https://api.github.com/repos/facebook/flow/issues/2249","id":246337759,"user":{"login":"thejameskyle","id":952783,"avatar_url":"https://avatars.githubusercontent.com/u/952783?v=3","gravatar_id":"","url":"https://api.github.com/users/thejameskyle","html_url":"https://github.com/thejameskyle","followers_url":"https://api.github.com/users/thejameskyle/followers","following_url":"https://api.github.com/users/thejameskyle/following{/other_user}","gists_url":"https://api.github.com/users/thejameskyle/gists{/gist_id}","starred_url":"https://api.github.com/users/thejameskyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejameskyle/subscriptions","organizations_url":"https://api.github.com/users/thejameskyle/orgs","repos_url":"https://api.github.com/users/thejameskyle/repos","events_url":"https://api.github.com/users/thejameskyle/events{/privacy}","received_events_url":"https://api.github.com/users/thejameskyle/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T12:53:45Z","updated_at":"2016-09-12T12:53:45Z","body":"@MoOx could you give a full example"}}
{"actor":{"display_login":"thejameskyle"}}