@@ -22,13 +22,15 @@ import {FirebaseNamespaceInternals} from './firebase-namespace';
22
22
import { AppErrorCodes , FirebaseAppError } from './utils/error' ;
23
23
24
24
import { Auth } from './auth/auth' ;
25
+ import { MachineLearning } from './machine-learning/machine-learning' ;
25
26
import { Messaging } from './messaging/messaging' ;
26
27
import { Storage } from './storage/storage' ;
27
28
import { Database } from '@firebase/database' ;
28
29
import { DatabaseService } from './database/database' ;
29
30
import { Firestore } from '@google-cloud/firestore' ;
30
31
import { FirestoreService } from './firestore/firestore' ;
31
32
import { InstanceId } from './instance-id/instance-id' ;
33
+
32
34
import { ProjectManagement } from './project-management/project-management' ;
33
35
import { SecurityRules } from './security-rules/security-rules' ;
34
36
@@ -354,6 +356,19 @@ export class FirebaseApp {
354
356
} ) ;
355
357
}
356
358
359
+ /**
360
+ * Returns the MachineLearning service instance associated with this app.
361
+ *
362
+ * @return {MachineLearning } The Machine Learning service instance of this app
363
+ */
364
+ public machineLearning ( ) : MachineLearning {
365
+ return this . ensureService_ ( 'machine-learning' , ( ) => {
366
+ const machineLearningService : typeof MachineLearning =
367
+ require ( './machine-learning/machine-learning' ) . MachineLearning ;
368
+ return new machineLearningService ( this ) ;
369
+ } ) ;
370
+ }
371
+
357
372
/**
358
373
* Returns the ProjectManagement service instance associated with this app.
359
374
*
0 commit comments