Skip to content

Commit

Permalink
[reactive-element] remove unused internal parameters to requestUpdate (
Browse files Browse the repository at this point in the history
…#4413)

Co-authored-by: Andrew Jakubowicz <spyr1014@gmail.com>
  • Loading branch information
justinfagnani and AndrewJakubowicz committed Nov 28, 2023
1 parent 1af7991 commit f60a3a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .changeset/odd-buckets-attend.md
@@ -0,0 +1,7 @@
---
'@lit/reactive-element': patch
'lit-element': patch
'lit': patch
---

Remove unused internal parameters to `requestUpdate()`
12 changes: 1 addition & 11 deletions packages/reactive-element/src/reactive-element.ts
Expand Up @@ -1237,30 +1237,20 @@ export abstract class ReactiveElement
* @param oldValue old value of requesting property
* @param options property options to use instead of the previously
* configured options
* @param initial whether this call is for the initial value of the property.
* Initial values do not reflect to an attribute.
* @category updates
*/
requestUpdate(
name?: PropertyKey,
oldValue?: unknown,
options?: PropertyDeclaration
): void;
/* @internal */
requestUpdate(
name?: PropertyKey,
oldValue?: unknown,
options?: PropertyDeclaration,
initial = false,
initialValue?: unknown
): void {
// If we have a property key, perform property update steps.
if (name !== undefined) {
options ??= (
this.constructor as typeof ReactiveElement
).getPropertyOptions(name);
const hasChanged = options.hasChanged ?? notEqual;
const newValue = initial ? initialValue : this[name as keyof this];
const newValue = this[name as keyof this];
if (hasChanged(newValue, oldValue)) {
this._$changeProperty(name, oldValue, options);
} else {
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-size.js
Expand Up @@ -9,7 +9,7 @@ import * as fs from 'fs';
// it's likely that we'll ask you to investigate ways to reduce the size.
//
// In either case, update the size here and push a new commit to your PR.
const expectedLitCoreSize = 15447;
const expectedLitCoreSize = 15436;
const expectedLitHtmlSize = 7250;

const litCoreSrc = fs.readFileSync('packages/lit/lit-core.min.js', 'utf8');
Expand Down

0 comments on commit f60a3a2

Please sign in to comment.