From 79619cdf39eb5005b4004747145d92077c4a4c9b Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Thu, 5 Dec 2024 11:37:55 +0000 Subject: [PATCH] review updates --- client/src/community/contributor-list.js | 7 +------ client/src/community/types.d.ts | 5 +++++ client/src/curriculum/scrim-inline.js | 6 ++---- 3 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 client/src/community/types.d.ts diff --git a/client/src/community/contributor-list.js b/client/src/community/contributor-list.js index d450909e686a..7bb9da45a948 100644 --- a/client/src/community/contributor-list.js +++ b/client/src/community/contributor-list.js @@ -2,12 +2,7 @@ import { LitElement, html } from "lit"; import styles from "./contributor-list.scss?css" with { type: "css" }; -/** - * @typedef {Object} ContributorData - * @property {string} name - * @property {string} github - * @property {string} [org] - */ +/** @import { ContributorData } from "./types" */ export class ContributorList extends LitElement { static properties = { diff --git a/client/src/community/types.d.ts b/client/src/community/types.d.ts new file mode 100644 index 000000000000..7fb5a60a340b --- /dev/null +++ b/client/src/community/types.d.ts @@ -0,0 +1,5 @@ +export interface ContributorData { + name: string; + github: string; + org?: string; +} diff --git a/client/src/curriculum/scrim-inline.js b/client/src/curriculum/scrim-inline.js index 90cbd582bc49..894e7d529599 100644 --- a/client/src/curriculum/scrim-inline.js +++ b/client/src/curriculum/scrim-inline.js @@ -143,10 +143,8 @@ class ScrimInline extends LitElement { * @param {MouseEvent} e */ #toggle(e) { - if (e.target) { - /** @type {HTMLElement} */ - (e.target).dataset.glean = - `${CURRICULUM}: scrim fullscreen -> ${this._fullscreen ? 0 : 1} id:${this._scrimId}`; + if (e.target instanceof HTMLElement) { + e.target.dataset.glean = `${CURRICULUM}: scrim fullscreen -> ${this._fullscreen ? 0 : 1} id:${this._scrimId}`; } if (this._fullscreen) { this.#close();