Skip to content

Commit f60a3a2

Browse files
[reactive-element] remove unused internal parameters to requestUpdate (#4413)
Co-authored-by: Andrew Jakubowicz <spyr1014@gmail.com>
1 parent 1af7991 commit f60a3a2

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

.changeset/odd-buckets-attend.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@lit/reactive-element': patch
3+
'lit-element': patch
4+
'lit': patch
5+
---
6+
7+
Remove unused internal parameters to `requestUpdate()`

packages/reactive-element/src/reactive-element.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,30 +1237,20 @@ export abstract class ReactiveElement
12371237
* @param oldValue old value of requesting property
12381238
* @param options property options to use instead of the previously
12391239
* configured options
1240-
* @param initial whether this call is for the initial value of the property.
1241-
* Initial values do not reflect to an attribute.
12421240
* @category updates
12431241
*/
12441242
requestUpdate(
12451243
name?: PropertyKey,
12461244
oldValue?: unknown,
12471245
options?: PropertyDeclaration
1248-
): void;
1249-
/* @internal */
1250-
requestUpdate(
1251-
name?: PropertyKey,
1252-
oldValue?: unknown,
1253-
options?: PropertyDeclaration,
1254-
initial = false,
1255-
initialValue?: unknown
12561246
): void {
12571247
// If we have a property key, perform property update steps.
12581248
if (name !== undefined) {
12591249
options ??= (
12601250
this.constructor as typeof ReactiveElement
12611251
).getPropertyOptions(name);
12621252
const hasChanged = options.hasChanged ?? notEqual;
1263-
const newValue = initial ? initialValue : this[name as keyof this];
1253+
const newValue = this[name as keyof this];
12641254
if (hasChanged(newValue, oldValue)) {
12651255
this._$changeProperty(name, oldValue, options);
12661256
} else {

scripts/check-size.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as fs from 'fs';
99
// it's likely that we'll ask you to investigate ways to reduce the size.
1010
//
1111
// In either case, update the size here and push a new commit to your PR.
12-
const expectedLitCoreSize = 15447;
12+
const expectedLitCoreSize = 15436;
1313
const expectedLitHtmlSize = 7250;
1414

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

0 commit comments

Comments
 (0)