pull/280/head
Vladimir Mandic 2021-03-17 20:26:43 -04:00
parent c1c6b66315
commit 13a2472f75
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 ### **HEAD -> main** 2021/03/17 mandic00@live.com
- enforce types
- regen type declarations - regen type declarations
- switch to single jumbo dts - switch to single jumbo dts
- type definitions - type definitions

View File

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