From 4c6db866c1567f1755536a6d88fefa86c12815e3 Mon Sep 17 00:00:00 2001 From: Jun Koyama Date: Tue, 6 Oct 2020 23:59:14 +0900 Subject: [PATCH] Specify type for Object.freeze --- src/cubismdefaultparameterid.ts | 4 +++- src/live2dcubismframework.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cubismdefaultparameterid.ts b/src/cubismdefaultparameterid.ts index 1905f43..afc8260 100644 --- a/src/cubismdefaultparameterid.ts +++ b/src/cubismdefaultparameterid.ts @@ -10,7 +10,9 @@ * デフォルト値の仕様は以下のマニュアルに基づく
* https://docs.live2d.com/cubism-editor-manual/standard-parametor-list/ */ -export const CubismDefaultParameterId = Object.freeze({ +export const CubismDefaultParameterId = Object.freeze<{ + [key: string]: string; +}>({ // パーツID HitAreaPrefix: 'HitArea', HitAreaHead: 'Head', diff --git a/src/live2dcubismframework.ts b/src/live2dcubismframework.ts index aa94fda..6413da3 100644 --- a/src/live2dcubismframework.ts +++ b/src/live2dcubismframework.ts @@ -54,7 +54,7 @@ let s_cubismIdManager: CubismIdManager = null; /** * Framework内で使う定数の宣言 */ -export const Constant = Object.freeze({ +export const Constant = Object.freeze<{ [key: string]: number }>({ vertexOffset: 0, // メッシュ頂点のオフセット値 vertexStep: 2 // メッシュ頂点のステップ値 });