@lit/reactive-element
Version:
37 lines (34 loc) • 1.23 kB
JavaScript
import { property } from './property.js';
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
* property decorators (but not class decorators) in this file that have
* an @ExportDecoratedItems annotation must be defined as a regular function,
* not an arrow function.
*/
/**
* Declares a private or protected reactive property that still triggers
* updates to the element when it changes. It does not reflect from the
* corresponding attribute.
*
* Properties declared this way must not be used from HTML or HTML templating
* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* @category Decorator
*/
function state(options) {
return property({
...options,
// Add both `state` and `attribute` because we found a third party
// controller that is keying off of PropertyOptions.state to determine
// whether a field is a private internal property or not.
state: true,
attribute: false,
});
}
export { state };
//# sourceMappingURL=state.js.map