]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/theme/theme.service.ts
NoImplicitAny flag true (#1157)
[github/Chocobozzz/PeerTube.git] / client / src / app / core / theme / theme.service.ts
index a6eef089843017bb889e5ef4b55f579597df0d78..50c19ecac38f3404f5645400231cd0c9c8a7f7ca 100644 (file)
@@ -5,7 +5,7 @@ import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
 export class ThemeService {
   private theme = document.querySelector('body')
   private darkTheme = false
-  private previousTheme = {}
+  private previousTheme: { [ id: string ]: string } = {}
 
   constructor () {
     // initialise the alternative theme with dark theme colors
@@ -33,7 +33,7 @@ export class ThemeService {
     }
   }
 
-  private switchProperty (property, newValue?) {
+  private switchProperty (property: string, newValue?: string) {
     const propertyOldvalue = window.getComputedStyle(this.theme).getPropertyValue('--' + property)
     this.theme.style.setProperty('--' + property, (newValue) ? newValue : this.previousTheme[property])
     this.previousTheme[property] = propertyOldvalue