{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/5435","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/5435/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/5435/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/5435/events","html_url":"https://github.com/facebook/flow/issues/5435","id":278037733,"number":5435,"title":"How flow resolves types?","user":{"login":"Diokuz","id":2929442,"avatar_url":"https://avatars0.githubusercontent.com/u/2929442?v=4","gravatar_id":"","url":"https://api.github.com/users/Diokuz","html_url":"https://github.com/Diokuz","followers_url":"https://api.github.com/users/Diokuz/followers","following_url":"https://api.github.com/users/Diokuz/following{/other_user}","gists_url":"https://api.github.com/users/Diokuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Diokuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diokuz/subscriptions","organizations_url":"https://api.github.com/users/Diokuz/orgs","repos_url":"https://api.github.com/users/Diokuz/repos","events_url":"https://api.github.com/users/Diokuz/events{/privacy}","received_events_url":"https://api.github.com/users/Diokuz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-30T08:37:55Z","updated_at":"2017-11-30T12:18:15Z","closed_at":"2017-11-30T12:18:15Z","author_association":"NONE","body":"Im working on my _js_ library, annotated with flow. It is a _private library_, so I cant make a _pr_ to https://github.com/flowtype/flow-typed\r\n\r\nWhat is an official way to supply a library with _flow types_? I want my users to be able to import them. Like that:\r\n\r\n```\r\nimport type { MyType } from 'my-private-library'\r\n```\r\n\r\nI can place all my types to `node_modules/my-private-library/index.js` file (as described in [Flow Module Types](https://flow.org/en/docs/types/modules/)), but that way seems pretty hacky.\r\n\r\nI found out (https://github.com/facebook/react/issues/11680) that flow, somehow, resolves `import type { ComponentType } from 'react'` as https://github.com/facebook/flow/blob/master/lib/react.js, which not placed in `node_modules/react`, actually.\r\n\r\nSo, how flow resolves _type imports_? How can I make it resolve `from 'my-private-library'` as `node_modules/my-private-library/src/types.js` for example?"}}
{"actor":{"display_login":"Diokuz"}}