From e4582fb9d51bd68af1edc82f889e56ad5514fd69 Mon Sep 17 00:00:00 2001 From: Christopher Reed Date: Tue, 3 Sep 2024 13:18:43 -0400 Subject: [PATCH] Fix typings --- modules/engine/src/shader-inputs.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/engine/src/shader-inputs.ts b/modules/engine/src/shader-inputs.ts index c8d58d99d4..2b0aaf4608 100644 --- a/modules/engine/src/shader-inputs.ts +++ b/modules/engine/src/shader-inputs.ts @@ -24,8 +24,7 @@ export class ShaderInputs< * The map of modules * @todo should should this include the resolved dependencies? */ - // @ts-expect-error Fix typings - modules: Readonly<{[P in keyof ShaderPropsT]: ShaderModule}>; + modules: Readonly<{[P in keyof ShaderPropsT]: ShaderModule>}>; /** Stores the uniform values for each module */ moduleUniforms: Record>; @@ -38,8 +37,7 @@ export class ShaderInputs< * Create a new UniformStore instance * @param modules */ - // @ts-expect-error Fix typings - constructor(modules: {[P in keyof ShaderPropsT]?: ShaderModule}) { + constructor(modules: {[P in keyof ShaderPropsT]?: ShaderModule, any>}) { // Extract modules with dependencies const resolvedModules = getShaderModuleDependencies( Object.values(modules).filter(module => module.dependencies) @@ -52,8 +50,7 @@ export class ShaderInputs< log.log(1, 'Creating ShaderInputs with modules', Object.keys(modules))(); // Store the module definitions and create storage for uniform values and binding values, per module - // @ts-expect-error Fix typings - this.modules = modules as {[P in keyof ShaderPropsT]: ShaderModule}; + this.modules = modules as {[P in keyof ShaderPropsT]: ShaderModule>}; this.moduleUniforms = {} as Record>; this.moduleBindings = {} as Record>; @@ -72,7 +69,7 @@ export class ShaderInputs< /** * Set module props */ - setProps(props: Partial<{[P in keyof ShaderPropsT]?: Partial}>): void { + setProps(props: Partial<{[P in keyof ShaderPropsT]?: Partial>}>): void { for (const name of Object.keys(props)) { const moduleName = name as keyof ShaderPropsT; const moduleProps = props[moduleName] || {};