diff --git a/src/scripts/PageLoad.ts b/src/scripts/PageLoad.ts index 85742dc..78394c9 100644 --- a/src/scripts/PageLoad.ts +++ b/src/scripts/PageLoad.ts @@ -1,7 +1,7 @@ export type HtmlReady = 'loading' | 'done' | 'error'; export class PageLoad { - static MOTION_DELAY = 1200; + static readonly MOTION_DELAY = 1200; static documentState() { return document.readyState; diff --git a/src/scripts/Portfolio.ts b/src/scripts/Portfolio.ts index 151f14c..cf6b8aa 100644 --- a/src/scripts/Portfolio.ts +++ b/src/scripts/Portfolio.ts @@ -40,7 +40,7 @@ export class Portfolio { // re-appear everytime the url is updated (ex: via replaceState). I am // simply disabling this behaviour for now... but I may need to do a // user-agent sniff in order to work around it. - static SUPPORT_URL_UPDATES = false; + static readonly SUPPORT_URL_UPDATES = false; constructor(selectors?: Selectors, onScroll?: CustomScrollFn) { this.#selector = { diff --git a/src/scripts/PwaServiceWorker.ts b/src/scripts/PwaServiceWorker.ts index 21a5da9..8a3a087 100644 --- a/src/scripts/PwaServiceWorker.ts +++ b/src/scripts/PwaServiceWorker.ts @@ -9,7 +9,7 @@ type PwaReloadFn = ((reloadPage?: boolean) => Promise) | undefined; export class PwaServiceWorker { // TODO: We probably want to initialize a global singleton // that gets imported and shared in various places. - static #tracker = new ToastTracker(); + static readonly #tracker = new ToastTracker(); static #refreshWorker: PwaReloadFn; static install() { diff --git a/src/scripts/SecretEmail.ts b/src/scripts/SecretEmail.ts index afe51b3..ad51993 100644 --- a/src/scripts/SecretEmail.ts +++ b/src/scripts/SecretEmail.ts @@ -6,8 +6,8 @@ const DEFAULT_CLASSNAMES = { }; export class SecretEmail { - static defaultSecretClass = DEFAULT_CLASSNAMES.secret; - static defaultReplaceClass = DEFAULT_CLASSNAMES.replace; + static readonly defaultSecretClass = DEFAULT_CLASSNAMES.secret; + static readonly defaultReplaceClass = DEFAULT_CLASSNAMES.replace; readonly email: string; readonly secretClass: string; diff --git a/src/scripts/ToastTracker.ts b/src/scripts/ToastTracker.ts index 41df8c6..eb2487b 100644 --- a/src/scripts/ToastTracker.ts +++ b/src/scripts/ToastTracker.ts @@ -4,8 +4,8 @@ type AddArgs = ConstructorParameters; // TODO: Add event for `count` change using `emitten`. export class ToastTracker { - static MAX_SIZE = 10; - static DISMISS_AFTER_MS = 9999; + static readonly MAX_SIZE = 10; + static readonly DISMISS_AFTER_MS = 9999; #portal: HTMLElement; #queue: Map;