{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2328","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2328/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2328/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2328/events","html_url":"https://github.com/facebook/flow/issues/2328","id":172954917,"number":2328,"title":"Libdef syntax: Export default + named exports","user":{"login":"ryyppy","id":1121889,"avatar_url":"https://avatars.githubusercontent.com/u/1121889?v=3","gravatar_id":"","url":"https://api.github.com/users/ryyppy","html_url":"https://github.com/ryyppy","followers_url":"https://api.github.com/users/ryyppy/followers","following_url":"https://api.github.com/users/ryyppy/following{/other_user}","gists_url":"https://api.github.com/users/ryyppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ryyppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryyppy/subscriptions","organizations_url":"https://api.github.com/users/ryyppy/orgs","repos_url":"https://api.github.com/users/ryyppy/repos","events_url":"https://api.github.com/users/ryyppy/events{/privacy}","received_events_url":"https://api.github.com/users/ryyppy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-24T13:42:33Z","updated_at":"2016-08-24T14:07:22Z","closed_at":"2016-08-24T14:07:22Z","body":"Hi!\r\nI have a very delicate problem to express the `redux-saga` module export interface:\r\n\r\n```\r\n// consumer.js\r\nimport createSagaMiddleware from 'redux-saga';\r\nimport { takeEvery } from 'redux-saga';\r\n```\r\n\r\nSo I know how to express `takeEvery`, like this:\r\n```\r\n// flow-typed/redux-saga.js\r\n\r\ndeclare module 'redux-saga' {\r\n  declare type takeEvery: () => any;\r\n}\r\n```\r\n\r\nI also know how I could export `createSagaMiddleware`:\r\n```\r\n// flow-typed/redux-saga.js\r\n\r\ndeclare module 'redux-saga' {\r\n  declare module.exports: () => any;\r\n}\r\n```\r\n\r\nBut I cannot do this:\r\n\r\n```\r\n// flow-typed/redux-saga.js\r\n\r\ndeclare module 'redux-saga' {\r\n  declare type takeEvery: () => any;\r\n  declare module.exports: () => any;\r\n}\r\n```\r\n\r\nIn the last example, `flow` will only recognize the default export, but not the named exports...\r\n\r\nI know there are limitations, since `flow` will either switch between CJS / ES module mode.\r\nIs there any workaround for this? This is a blocker to express my almost-finished `redux-saga` libdefs."}}
{"actor":{"display_login":"ryyppy"}}