Skip to content

Commit 7b331e5

Browse files
Make @State() not appear to be deprecated. (#1192)
1 parent 21a4d93 commit 7b331e5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/lib/decorators.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
/*
16-
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
16+
* IMPORTANT: For compatibility with tsickle and the Closure Compiler, all
1717
* property decorators (but not class decorators) in this file that have
1818
* an @ExportDecoratedItems annotation must be defined as a regular function,
1919
* not an arrow function.
@@ -181,10 +181,10 @@ export interface InternalPropertyDeclaration<Type = unknown> {
181181
*
182182
* Properties declared this way must not be used from HTML or HTML templating
183183
* systems, they're solely for properties internal to the element. These
184-
* properties may be renamed by optimization tools like closure compiler.
184+
* properties may be renamed by optimization tools like the Closure Compiler.
185185
* @category Decorator
186-
* @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0.
187-
* Please update to `state` now to be compatible with 3.0.
186+
* @deprecated `internalProperty` has been renamed to `state` in lit-element
187+
* 3.0. Please update to `state` now to be compatible with 3.0.
188188
*/
189189
export function internalProperty(options?: InternalPropertyDeclaration) {
190190
return property({attribute: false, hasChanged: options?.hasChanged});
@@ -196,10 +196,11 @@ export function internalProperty(options?: InternalPropertyDeclaration) {
196196
*
197197
* Properties declared this way must not be used from HTML or HTML templating
198198
* systems, they're solely for properties internal to the element. These
199-
* properties may be renamed by optimization tools like closure compiler.
199+
* properties may be renamed by optimization tools like the Closure Compiler.
200200
* @category Decorator
201201
*/
202-
export const state = internalProperty;
202+
export const state = (options?: InternalPropertyDeclaration) =>
203+
internalProperty(options);
203204

204205
/**
205206
* A property decorator that converts a class property into a getter that

0 commit comments

Comments
 (0)