{"action":"created","issue":{"url":"https://api.github.com/repos/winterbe/streamjs/issues/34","labels_url":"https://api.github.com/repos/winterbe/streamjs/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/winterbe/streamjs/issues/34/comments","events_url":"https://api.github.com/repos/winterbe/streamjs/issues/34/events","html_url":"https://github.com/winterbe/streamjs/issues/34","id":88088277,"number":34,"title":"Static factory method for creating streams from arrays","user":{"login":"erosb","id":273158,"avatar_url":"https://avatars.githubusercontent.com/u/273158?v=3","gravatar_id":"","url":"https://api.github.com/users/erosb","html_url":"https://github.com/erosb","followers_url":"https://api.github.com/users/erosb/followers","following_url":"https://api.github.com/users/erosb/following{/other_user}","gists_url":"https://api.github.com/users/erosb/gists{/gist_id}","starred_url":"https://api.github.com/users/erosb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erosb/subscriptions","organizations_url":"https://api.github.com/users/erosb/orgs","repos_url":"https://api.github.com/users/erosb/repos","events_url":"https://api.github.com/users/erosb/events{/privacy}","received_events_url":"https://api.github.com/users/erosb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"winterbe","id":485033,"avatar_url":"https://avatars.githubusercontent.com/u/485033?v=3","gravatar_id":"","url":"https://api.github.com/users/winterbe","html_url":"https://github.com/winterbe","followers_url":"https://api.github.com/users/winterbe/followers","following_url":"https://api.github.com/users/winterbe/following{/other_user}","gists_url":"https://api.github.com/users/winterbe/gists{/gist_id}","starred_url":"https://api.github.com/users/winterbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winterbe/subscriptions","organizations_url":"https://api.github.com/users/winterbe/orgs","repos_url":"https://api.github.com/users/winterbe/repos","events_url":"https://api.github.com/users/winterbe/events{/privacy}","received_events_url":"https://api.github.com/users/winterbe/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-14T00:12:39Z","updated_at":"2015-06-14T12:13:26Z","closed_at":"2015-06-14T07:48:44Z","body":"I'm working on a [typescript definition file](https://github.com/erosb/DefinitelyTyped/blob/streamjs/streamjs/streamjs.d.ts) for streamjs.\r\n\r\nI found that the only way to create a stream from an array is to invoke `Stream(array)` as a function. It works in javascript but sadly typescript currently does not have support to define a class and a function with the same name, so I cannot include it in my typescript definition file.\r\n\r\nI would be pleased if you could add a `Stream.from(array)` static factory method so that I could create an appropriate definition for it in my streamjs.d.ts file. "},"comment":{"url":"https://api.github.com/repos/winterbe/streamjs/issues/comments/111820150","html_url":"https://github.com/winterbe/streamjs/issues/34#issuecomment-111820150","issue_url":"https://api.github.com/repos/winterbe/streamjs/issues/34","id":111820150,"user":{"login":"erosb","id":273158,"avatar_url":"https://avatars.githubusercontent.com/u/273158?v=3","gravatar_id":"","url":"https://api.github.com/users/erosb","html_url":"https://github.com/erosb","followers_url":"https://api.github.com/users/erosb/followers","following_url":"https://api.github.com/users/erosb/following{/other_user}","gists_url":"https://api.github.com/users/erosb/gists{/gist_id}","starred_url":"https://api.github.com/users/erosb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erosb/subscriptions","organizations_url":"https://api.github.com/users/erosb/orgs","repos_url":"https://api.github.com/users/erosb/repos","events_url":"https://api.github.com/users/erosb/events{/privacy}","received_events_url":"https://api.github.com/users/erosb/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T12:13:26Z","updated_at":"2015-06-14T12:13:26Z","body":"Hi!\r\nI've just [pushed some changes](https://github.com/erosb/DefinitelyTyped/commit/bd123fb8824cc1a554ed1fa4abc2f4331ceaff17) to my streamjs.d.ts file.\r\nI will wait for your next release before sending a pull request to borisyankov/DefinitelyTyped so I can also add definition for the `from(array)` method. I recommend making it 1.5.0 since it is a backward-compatible API change (afair according so semver the minor version number should be incremented).\r\n\r\nSadly the rest of the unsupported methods cannot be defined in my .d.ts file, since currently the typescript compiler fails to infer the actual generic types when it is represented only by the return type and not by one of the parameter types. This is the case for `Stream.empty()`, `Optional.empty()`, `Stream.map(path)` and `Stream.flatMap(path)` . But it is a typescript issue, not much to do with it in streamjs\r\n"}}