Fix missed rename, and improve types (#276)

Fixes a missed rename, in `src/item-index.ts`: I'd renamed `coll` to
`item` but missed updating it in the `update` method's
`changedProperties` map.

This PR fixes that, and adds better typing to all of the instances of
`changedProperties` by using
[`PropertyValues<this>`](https://lit.dev/docs/components/lifecycle/#typescript-types-for-changedproperties),
and implementing class properties for missing Lit properties.
This commit is contained in:
Emma Segal-Grossman
2024-01-05 18:32:22 -08:00
committed by GitHub
parent 3bee02bd89
commit a40471128f
15 changed files with 229 additions and 396 deletions
+4 -1
View File
@@ -14,7 +14,10 @@ import type { Item as ItemType } from "./types";
// ===========================================================================
export class RWPEmbedReceipt extends LitElement {
@property({ type: Object }) collInfo: ItemType | null = null;
@property({ type: Object }) collInfo:
| ItemType
| null
| Record<string, never> = null;
@property({ type: Object }) appLogo = null;
@property({ type: String }) ts: string | null = null;
@property({ type: String }) url: string | null = null;