]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
Remove suppressImplicitAnyIndexErrors
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-custom-markup / dynamic-element.service.ts
index 208dba721dd8d8fcfc21ee9a0632bf8a4ef07385..a129070553b35dc7e2bd7da023721eff0c6107d3 100644 (file)
@@ -10,6 +10,7 @@ import {
   SimpleChanges,
   Type
 } from '@angular/core'
+import { objectKeysTyped } from '@shared/core-utils'
 
 @Injectable()
 export class DynamicElementService {
@@ -41,12 +42,12 @@ export class DynamicElementService {
   setModel <T> (componentRef: ComponentRef<T>, attributes: Partial<T>) {
     const changes: SimpleChanges = {}
 
-    for (const key of Object.keys(attributes)) {
+    for (const key of objectKeysTyped(attributes)) {
       const previousValue = componentRef.instance[key]
       const newValue = attributes[key]
 
       componentRef.instance[key] = newValue
-      changes[key] = new SimpleChange(previousValue, newValue, previousValue === undefined)
+      changes[key as string] = new SimpleChange(previousValue, newValue, previousValue === undefined)
     }
 
     const component = componentRef.instance