Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@justinfagnani
Copy link
Collaborator

Fixes a user-reported issue on Discord where this kind of field produced an error:

  @query('dt-dialog') private accessor dialogDce: DtDialog | undefined;

because DtDialog | undefined is not assignable to Element.

@query() can return null, not undefined, so this PR adds null to the field type and the error can be fixed by writing the field like:

  @query('dt-dialog') private accessor dialogDce!: DtDialog | null;

Note that the non-null assertion ! is necessary.

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2023

🦋 Changeset detected

Latest commit: 19d13ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@lit/reactive-element Patch
lit-element Patch
lit Patch
@lit-examples/nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@justinfagnani justinfagnani requested review from rictic and removed request for kevinpschaaf October 11, 2023 16:29
@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -4% - +9% (-0.76ms - +1.80ms)
    this-change vs tip-of-tree

render

  • this-change: 82.36ms - 86.97ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -7% - +4% (-2.39ms - +1.35ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +1% (-1.91ms - +0.80ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +3% (-1.89ms - +1.59ms)
    this-change vs tip-of-tree

update

  • this-change: 890.08ms - 905.62ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -5% - +6% (-3.77ms - +4.48ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +2% (-1.61ms - +1.96ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-8.51ms - +6.15ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 874.72ms - 891.91ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -0% - +1% (-1.08ms - +12.03ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
82.36ms - 86.97ms-

update

VersionAvg timevs
890.08ms - 905.62ms-

update-reflect

VersionAvg timevs
874.72ms - 891.91ms-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
31.46ms - 34.02ms-unsure 🔍
-7% - +4%
-2.39ms - +1.35ms
unsure 🔍
-14% - +0%
-5.11ms - +0.30ms
tip-of-tree
tip-of-tree
31.89ms - 34.63msunsure 🔍
-4% - +7%
-1.35ms - +2.39ms
-unsure 🔍
-13% - +2%
-4.63ms - +0.87ms
previous-release
previous-release
32.76ms - 37.52msunsure 🔍
-1% - +16%
-0.30ms - +5.11ms
unsure 🔍
-3% - +14%
-0.87ms - +4.63ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
67.24ms - 73.95ms-unsure 🔍
-5% - +6%
-3.77ms - +4.48ms
unsure 🔍
-5% - +5%
-3.56ms - +3.78ms
tip-of-tree
tip-of-tree
67.85ms - 72.64msunsure 🔍
-6% - +5%
-4.48ms - +3.77ms
-unsure 🔍
-4% - +4%
-3.06ms - +2.57ms
previous-release
previous-release
69.01ms - 71.96msunsure 🔍
-5% - +5%
-3.78ms - +3.56ms
unsure 🔍
-4% - +4%
-2.57ms - +3.06ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
18.78ms - 21.09ms-unsure 🔍
-4% - +9%
-0.76ms - +1.80ms
unsure 🔍
-3% - +10%
-0.61ms - +1.93ms
tip-of-tree
tip-of-tree
18.86ms - 19.98msunsure 🔍
-9% - +4%
-1.80ms - +0.76ms
-unsure 🔍
-3% - +5%
-0.63ms - +0.92ms
previous-release
previous-release
18.73ms - 19.82msunsure 🔍
-10% - +3%
-1.93ms - +0.61ms
unsure 🔍
-5% - +3%
-0.92ms - +0.63ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
57.36ms - 59.12ms-unsure 🔍
-3% - +1%
-1.91ms - +0.80ms
unsure 🔍
-3% - +2%
-1.58ms - +1.44ms
tip-of-tree
tip-of-tree
57.76ms - 59.83msunsure 🔍
-1% - +3%
-0.80ms - +1.91ms
-unsure 🔍
-2% - +4%
-1.12ms - +2.09ms
previous-release
previous-release
57.08ms - 59.54msunsure 🔍
-2% - +3%
-1.44ms - +1.58ms
unsure 🔍
-4% - +2%
-2.09ms - +1.12ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
124.22ms - 126.55ms-unsure 🔍
-1% - +2%
-1.61ms - +1.96ms
unsure 🔍
-3% - +1%
-3.82ms - +0.87ms
tip-of-tree
tip-of-tree
123.86ms - 126.57msunsure 🔍
-2% - +1%
-1.96ms - +1.61ms
-unsure 🔍
-3% - +1%
-4.09ms - +0.80ms
previous-release
previous-release
124.82ms - 128.89msunsure 🔍
-1% - +3%
-0.87ms - +3.82ms
unsure 🔍
-1% - +3%
-0.80ms - +4.09ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
55.03ms - 57.34ms-unsure 🔍
-3% - +3%
-1.89ms - +1.59ms
unsure 🔍
-1% - +4%
-0.82ms - +2.31ms
tip-of-tree
tip-of-tree
55.04ms - 57.63msunsure 🔍
-3% - +3%
-1.59ms - +1.89ms
-unsure 🔍
-1% - +5%
-0.77ms - +2.56ms
previous-release
previous-release
54.39ms - 56.49msunsure 🔍
-4% - +1%
-2.31ms - +0.82ms
unsure 🔍
-5% - +1%
-2.56ms - +0.77ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
909.88ms - 921.79ms-unsure 🔍
-1% - +1%
-8.51ms - +6.15ms
unsure 🔍
-1% - +1%
-8.43ms - +8.44ms
tip-of-tree
tip-of-tree
912.75ms - 921.28msunsure 🔍
-1% - +1%
-6.15ms - +8.51ms
-unsure 🔍
-1% - +1%
-6.15ms - +8.52ms
previous-release
previous-release
909.86ms - 921.80msunsure 🔍
-1% - +1%
-8.44ms - +8.43ms
unsure 🔍
-1% - +1%
-8.52ms - +6.15ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
904.37ms - 915.01ms-unsure 🔍
-0% - +1%
-1.08ms - +12.03ms
unsure 🔍
-0% - +1%
-2.57ms - +11.94ms
tip-of-tree
tip-of-tree
900.39ms - 908.04msunsure 🔍
-1% - +0%
-12.03ms - +1.08ms
-unsure 🔍
-1% - +1%
-7.03ms - +5.45ms
previous-release
previous-release
900.08ms - 909.94msunsure 🔍
-1% - +0%
-11.94ms - +2.57ms
unsure 🔍
-1% - +1%
-5.45ms - +7.03ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Contributor

The size of lit-html.js and lit-core.min.js are as expected.

Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@justinfagnani justinfagnani merged commit 89a5b08 into main Oct 11, 2023
@justinfagnani justinfagnani deleted the fix-query-types branch October 11, 2023 17:58
This was referenced Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants