pull/293/head
Vladimir Mandic 2021-03-17 20:26:43 -04:00
parent fdddebda2a
commit 7f644a3bde
2 changed files with 6 additions and 4 deletions

View File

@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
### **HEAD -> main** 2021/03/17 mandic00@live.com
- enforce types
- regen type declarations
- switch to single jumbo dts
- type definitions

View File

@ -20,17 +20,18 @@ import { Result } from './result';
import * as sample from './sample';
import * as app from '../package.json';
type Tensor = typeof tf.Tensor;
type Model = Object;
/** Generic Tensor object type */
export type Tensor = typeof tf.Tensor;
export type { Config } from './config';
export type { Result } from './result';
/** Defines all possible input types for **Human** detection */
export type Input = Tensor | ImageData | ImageBitmap | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas;
/** Error message */
export type Error = { error: string };
/** Instance of TensorFlow/JS */
export type TensorFlow = typeof tf;
/** Generic Model object type, holds instance of individual models */
type Model = Object;
// helper function: gets elapsed time on both browser and nodejs
const now = () => {