diff --git a/CHANGELOG.md b/CHANGELOG.md index 31b5f90b..7e550026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Repository: **** ### **HEAD -> main** 2021/03/17 mandic00@live.com +- enforce types - regen type declarations - switch to single jumbo dts - type definitions diff --git a/src/human.ts b/src/human.ts index 3ffcc43a..01149742 100644 --- a/src/human.ts +++ b/src/human.ts @@ -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 = () => {