Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 3bca199

Browse files
bump
1 parent 067221d commit 3bca199

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

demo-ng/app/tabs/mlkit/facedetection/facedetection.component.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
import { Component } from "@angular/core";
2-
import { MLKitDetectFacesOnDeviceResult } from "nativescript-plugin-firebase/mlkit/facedetection";
2+
import { MLKitDetectFacesOnDeviceResult, MLKitDetectFacesResultFace } from "nativescript-plugin-firebase/mlkit/facedetection";
33

44
@Component({
55
selector: "mlkit-facedetection",
66
moduleId: module.id,
77
templateUrl: "./facedetection.component.html",
88
})
99
export class FaceDetectionComponent {
10-
// TODO create a type (in the plugin) for these Arrays
11-
faces: Array<{
12-
smilingProbability?: number;
13-
leftEyeOpenProbability?: number;
14-
rightEyeOpenProbability?: number;
15-
}>;
10+
faces: Array<MLKitDetectFacesResultFace>;
1611

1712
mlKitAllOK: string;
1813

publish/publish.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PACK_DIR=package;
55
publish() {
66
cd $PACK_DIR
77
echo 'Publishing to npm...'
8+
# note that when using a tag: don't use regular version numbers as you can't publish those as 'latest' later
89
# npm publish *.tgz --tag next
910
npm publish *.tgz
1011
}

src/mlkit/facedetection/index.d.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { MLKitOptions } from "../";
22
import { MLKitCameraView, MLKitResult } from "../index";
33

4-
export interface MLKitDetectFacesOnDeviceResult extends MLKitResult {
4+
export interface MLKitDetectFacesResultFace {
55
// TODO there are more properties we can return, see https://firebase.google.com/docs/ml-kit/android/detect-faces
6-
faces: Array<{
7-
smilingProbability?: number;
8-
leftEyeOpenProbability?: number;
9-
rightEyeOpenProbability?: number;
10-
}>;
6+
smilingProbability?: number;
7+
leftEyeOpenProbability?: number;
8+
rightEyeOpenProbability?: number;
9+
}
10+
11+
export interface MLKitDetectFacesOnDeviceResult extends MLKitResult {
12+
faces: Array<MLKitDetectFacesResultFace>;
1113
}
1214

1315
export interface MLKitDetectFacesOnDeviceOptions extends MLKitOptions {

src/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-plugin-firebase",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"description": "Fire. Base. Firebase!",
55
"main": "firebase",
66
"typings": "index.d.ts",
@@ -88,7 +88,9 @@
8888
"Google",
8989
"AdMob",
9090
"Invites",
91-
"Dynamic Links"
91+
"Dynamic Links",
92+
"ML Kit",
93+
"Machine Learning"
9294
],
9395
"author": {
9496
"name": "Eddy Verbruggen",

0 commit comments

Comments
 (0)