File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 *
1616 */
1717
18- export type { FirebaseML } from './types/ml ' ;
18+ export * from './modular ' ;
1919
20- export type { FirebaseMLTypes } from './types/namespaced ' ;
20+ export type { FirebaseApp , FirebaseML } from './types/ml ' ;
2121
22- export * from './modular ' ;
22+ export type { FirebaseMLTypes } from './types/namespaced ' ;
2323
2424export * from './namespaced' ;
2525export { default } from './namespaced' ;
Original file line number Diff line number Diff line change 1616 */
1717
1818import { getApp } from '@react-native-firebase/app' ;
19- import type { FirebaseApp } from '@react-native-firebase/app' ;
20- import type { FirebaseML } from './types/ml' ;
19+ import type { FirebaseApp , FirebaseML } from './types/ml' ;
2120
2221/**
23- * Returns the existing default {@link FirebaseML} instance that is associated with the
24- * default {@link @firebase/app!FirebaseApp }. If no instance exists, initializes a new
25- * instance with default settings.
22+ * Returns the {@link FirebaseML} instance for the default or given {@link FirebaseApp}.
2623 *
27- * @returns The {@link FirebaseML} instance of the provided app.
24+ * @param app - The Firebase `FirebaseApp` to use. When omitted, the default app is used.
25+ * @returns The ML service instance for that app.
2826 */
2927export function getML ( app ?: FirebaseApp ) : FirebaseML {
3028 if ( app ) {
Original file line number Diff line number Diff line change 1515 *
1616 */
1717
18- import type { FirebaseApp } from '@react-native-firebase/app' ;
18+ import type { ReactNativeFirebase } from '@react-native-firebase/app' ;
19+
20+ export type FirebaseApp = ReactNativeFirebase . FirebaseApp ;
1921
2022/**
21- * Firebase ML module instance for the modular API.
23+ * Firebase ML service instance for the modular API.
24+ *
25+ * Current Firebase JS SDK releases do not ship a `firebase/ml` modular entry point; this interface
26+ * follows the same modular service-instance pattern used elsewhere in React Native Firebase (see e.g.
27+ * the Firestore package's `Firestore` type).
2228 */
23- export interface FirebaseML {
29+ export interface FirebaseML extends ReactNativeFirebase . FirebaseModule {
2430 /** The FirebaseApp this module is associated with */
2531 app : FirebaseApp ;
2632}
You can’t perform that action at this time.
0 commit comments