-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export the Stream class so type information can be imported #3456
Conversation
No Taskcluster jobs started for this pull requestThe `allowPullRequests` configuration for this repository (in `.taskcluster.yml` on the
default branch) does not allow starting tasks for this pull request. |
Thanks for the quick reply! |
Yes, I think it would be better in light of that. Can you update your PR? |
I've named its exported type import {StreamType, Model} from './native_client/javascript'
const model = new Model(`path/to/model`)
let stream: StreamType | null = null
if (true)
stream = model.createStream() |
Yep. |
I think we should flip the naming, |
@sholtrop After you switch to |
f5e17c8
to
93427f4
Compare
Done! Hope I did everything correctly |
Opened #3457 to run tests. |
@reuben Maybe it's worth merging this also on |
Yeah I think so. |
In TypeScript, I would like to be able to do this:
To then initialize it later. However, the Stream class is not exported, and as a result neither is its type definition, meaning I cannot import it. This PR just adds the export keyword to solve this.