- Add
@ExportDecoratedItems
annotation to@query
and@queryAll
(used by tsickle). - The
@listen
decorator allows event handler functions that accept any subtype of Event. So you can write an event listener that accepts e.g. KeyboardEvent. Note that the relationship between the event name and the event subtype is not checked.
- Updated for Polymer 3.0.
- Now distributed on NPM as
@polymer/decorators
. Bower is no longer supported. - [BREAKING] Dropped support for Polymer 2.0. See the
2.x
branch for the previous version, which can still be installed from Bower. - [BREAKING] Now distributed as ES modules, like Polymer itself. HTML imports
and the
Polymer.decorators
global are no longer available. - [BREAKING] Dropped support for the Metadata Reflection API. All properties
must now explicitly set a
type
.
- Fix incorrectly formatted Polymer dependency that caused
ENOTFOUND
errors (#85).
- Add @ExportDecoratedItems annotations to decorators, for use by tsickle.
- A warning is no longer emitted when a computed property does not have
a property
type
set. - The missing
type
warning is now aconsole.warn
instead of aconsole.error
.
- [BREAKING] It is now always a compilation error to pass an argument to the
@computed
decorator factory that is not a property of the element class. Previously this check only applied when the class was explicitly passed as a generic parameter. Users must no longer pass the class as a generic parameter. - [BREAKING] It is now a compilation to apply the
@customElement
decorator to a class which does not extendPolymer.Element
. Polymer >= 2.4 (which provides this type) is now a Bower dependency of this package. - [BREAKING] It is now a compilation error to apply the
@listen
decorator to a method that is not compatible with the signature(e: EventTarget) => void
, or that hasprivate
orprotected
visibility. - [BREAKING] It is now a compilation error to pass zero targets to the
@computed
decorator factory.
- An exception is now thrown if both the
tagname
parameter to@customElement
is provided, and the staticis
class property is set (except in the case that theis
property is not an own-property of the class). Previously theis
property would always silently win over thetagname
when both were set. - An exception is now thrown if the
@listen
decorator is applied to an element that does not have theDeclarativeEventListeners
mixin applied. - Decorators now have more constrained type signatures.
- Remove npm dependency on
reflect-metadata
package.
- Allow
@property
to be used together with@computed
so that itstype
can be set. - Fix bug where
@observe
could not be used withPolymer.mixinBehaviors
.
- Fix missing generated files from
1.0.1
release.
- Fix malformed warning about missing type.
- Generated typings for the
DeclarativeEventListeners
mixin are now available atmixins/declarative-event-listeners.d.ts
. - [BREAKING] The
@observe
decorator now takes its dependencies as a rest parameter instead of an array (e.g.@observe('foo', 'bar')
instead of@observe(['foo', 'bar'])
). - [BREAKING] Decorators are now located at
polymer-decorators.js
instead ofglobal.js
(same for corresponding.d.ts
file).
- Added
observer
andcomputed
properties to the@property
decorator options. - Added
@listen
decorator andDeclarativeEventListeners
mixin. - Fixed bug where use of
Polymer.mixinBehaviors
with@property
or@computed
would throw an exception relating to the definition of the element's "properties" property.
- Metadata Reflection polyfill is no longer a bower dependency.
- Initial release.