From 6e8bf0f4f4d9dc71e0d7a8c8af299ca05548074d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 11 Sep 2021 23:08:18 -0400 Subject: [PATCH] fix usge of string enums --- .eslintrc.json | 1 + CHANGELOG.md | 5 ++--- src/config.ts | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f2e14a5d..77718bc2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -37,6 +37,7 @@ "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-shadow": "error", "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/triple-slash-reference": "off", "camelcase": "off", "dot-notation": "off", "func-names": "off", diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe92efc..fe60ec59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,8 @@ ### **HEAD -> main** 2021/09/11 mandic00@live.com - -### **origin/main** 2021/09/11 mandic00@live.com - +- implement event emitters +- fix iife loader - simplify dependencies - fix file permissions - remove old build server diff --git a/src/config.ts b/src/config.ts index f258050e..9e65f36e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,9 +7,10 @@ * Contains all configurable parameters * @typedef Config */ + export interface Config { /** Backend used for TFJS operations */ - backend: null | '' | 'cpu' | 'wasm' | 'webgl' | 'humangl' | 'tensorflow' | 'webgpu', + backend: '' | 'cpu' | 'wasm' | 'webgl' | 'humangl' | 'tensorflow' | 'webgpu' | null | string, /** Path to *.wasm files if backend is set to `wasm` */ wasmPath: string, @@ -24,7 +25,7 @@ export interface Config { * - warmup pre-initializes all models for faster inference but can take significant time on startup * - only used for `webgl` and `humangl` backends */ - warmup: 'none' | 'face' | 'full' | 'body', + warmup: 'none' | 'face' | 'full' | 'body' | string, /** Base model path (typically starting with file://, http:// or https://) for all models * - individual modelPath values are relative to this path