Skip to content

Commit

Permalink
Removing ReturnType helper, since it's part of the standard now.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 678871195
  • Loading branch information
MediaPipe Team authored and copybara-github committed Sep 25, 2024
1 parent 8620726 commit e64c471
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion mediapipe/web/graph_runner/graph_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {CreateGraphRunnerApi, CreateMediaPipeLibApi, FileLocator, WasmMediaPipeC
import {EmptyPacketListener, ErrorListener, SimpleListener, VectorListener} from './listener_types';
import {WasmModule} from './wasm_module';

export {type ReturnType} from './graph_runner_factory_api';
// This file contains the internal implementations behind the public APIs
// declared in "graph_runner_api.d.ts" and "graph_runner_factory_api.d.ts".

Expand Down
12 changes: 0 additions & 12 deletions mediapipe/web/graph_runner/graph_runner_factory_api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ export declare interface FileLocator {
mainScriptUrlOrBlob?: string;
}

/**
* Helper type macro for use with createMediaPipeLib. Allows us to easily infer
* the type of a mixin-extended GraphRunner. Example usage:
* const GraphRunnerConstructor =
* SupportImage(SupportSerialization(GraphRunner));
* let mediaPipe: ReturnType<typeof GraphRunnerConstructor>;
* ...
* mediaPipe = await createMediaPipeLib(GraphRunnerConstructor, ...);
*/
// tslint:disable-next-line:no-any
export type ReturnType<T> = T extends(...args: unknown[]) => infer R ? R : any;

/**
* Internal type of constructors used for initializing GraphRunner and
* subclasses.
Expand Down

0 comments on commit e64c471

Please sign in to comment.