From 5555b26e12c84ac6a003fa1f6e2ed68f43474bc9 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 17 Sep 2019 15:46:52 +0100 Subject: [PATCH] chore: tidying --- src/index.ts | 5 ++--- src/models.ts | 2 +- src/state.ts | 2 +- tsconfig.json | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1f99df4..2f21e0c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,7 @@ import { import { GetActionsList, HandleAction } from './actions' import { AtemConfig, GetConfigFields } from './config' import { ExecuteFeedback, FeedbackId, GetFeedbacksList } from './feedback' -import { GetAutoDetectModel, GetModelSpec, MODEL_AUTO_DETECT, ModelSpec, GetParsedModelSpec } from './models' +import { GetAutoDetectModel, GetModelSpec, GetParsedModelSpec, MODEL_AUTO_DETECT, ModelSpec } from './models' import { GetPresetsList } from './presets' import { InitVariables, @@ -74,12 +74,11 @@ class AtemInstance extends InstanceSkel { public updateConfig(config: AtemConfig) { this.config = config - this.initDone = false - this.model = GetModelSpec(config.modelID || MODEL_AUTO_DETECT) || GetAutoDetectModel() this.debug('ATEM changed model: ' + this.model.id) // Force clear the cached state + this.initDone = false this.atemState = new AtemState() this.updateCompanionBits() diff --git a/src/models.ts b/src/models.ts index 7c60f2a..932eb85 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,4 +1,4 @@ -import { Enums, AtemState } from 'atem-connection' +import { AtemState, Enums } from 'atem-connection' import { DropdownChoice } from '../../../instance_skel_types' export const MODEL_AUTO_DETECT = 0 diff --git a/src/state.ts b/src/state.ts index 739d19f..877969c 100644 --- a/src/state.ts +++ b/src/state.ts @@ -15,7 +15,7 @@ export function getUSK( keyIndex: number | string ): UpstreamKeyer | undefined { const me = getME(state, meIndex) - return me ? me.upstreamKeyers[keyIndex] : undefined + return me ? me.upstreamKeyers[keyIndex as number] : undefined } export function getDSK(state: AtemState, keyIndex: number | string): DownstreamKeyer | undefined { return state.video.downstreamKeyers[keyIndex] diff --git a/tsconfig.json b/tsconfig.json index 10c3e4a..9d5c0a0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "strictNullChecks": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, - "noImplicitAny": false, + "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true,