Skip to content

Commit 5a122b2

Browse files
authored
Add a small note about type checking context (#1134)
* Add a small note about type checking context I didn't want to go into the full details because it felt like it would disrupt the flow of this page, and the main information that people need to know is that we're not type checking private or protected fields.
1 parent 07aa54c commit 5a122b2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/lit-dev-content/site/docs/v2/data/context.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ class MyElement extends LitElement {
129129
}
130130
```
131131

132-
TypeScript will warn that the type `string` is not assignable to the type `Logger`.
132+
TypeScript will warn that the type `string` is not assignable to the type `Logger`. Note that this check is currently only for public fields.
133+
134+
<!--
135+
TODO https://github.com/lit/lit/issues/3926 this will likely need to be updated once we move to standard decorators.
136+
-->
133137

134138
#### Context equality
135139

packages/lit-dev-content/site/docs/v3/data/context.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ class MyElement extends LitElement {
129129
}
130130
```
131131

132-
TypeScript will warn that the type `string` is not assignable to the type `Logger`.
132+
TypeScript will warn that the type `string` is not assignable to the type `Logger`. Note that this check is currently only for public fields.
133+
134+
<!--
135+
TODO https://github.com/lit/lit/issues/3926 this will likely need to be updated once we move to standard decorators.
136+
-->
133137

134138
#### Context equality
135139

0 commit comments

Comments
 (0)