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:
@@ -165,9 +165,7 @@ class Pages extends LitElement {
|
||||
}
|
||||
const sorter = this.renderRoot.querySelector("wr-sorter") as Sorter;
|
||||
if (sorter) {
|
||||
// @ts-expect-error - TS2339 - Property 'sortKey' does not exist on type 'Sorter'.
|
||||
sorter.sortKey = this.sortKey;
|
||||
// @ts-expect-error - TS2339 - Property 'sortDesc' does not exist on type 'Sorter'.
|
||||
sorter.sortDesc = this.sortDesc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user