diff --git a/native_client/javascript/index.ts b/native_client/javascript/index.ts index fb2873983d..1b2bdf9242 100644 --- a/native_client/javascript/index.ts +++ b/native_client/javascript/index.ts @@ -65,7 +65,7 @@ export interface Metadata { * Provides an interface to a DeepSpeech stream. The constructor cannot be called * directly, use :js:func:`Model.createStream`. */ -export class Stream { +class Stream { /** @internal */ _impl: any; @@ -134,6 +134,12 @@ export class Stream { return result; } } +/** + * Exposes the type of Stream without actually exposing the class. + * Because the Stream class should not be instantiated directly, + * but instead be created via :js:func:`Model.createStream`. + */ +export type StreamType = Stream; /** * An object providing an interface to a trained DeepSpeech model.