-
ES7的装饰器是一个返回function的表达式(意思就是要么本身是函数要么返回函数),修饰属性的时候接受target, name, propertyDescriptor作为参数;修饰类的时候接受constructor作为target
装饰器一般是用于透明的包装一些东西的函数,加一些额外的功能
本质是Object.definePropertyDescriptor
ES201…
-
Hi @ManuelDeLeon , How do we use the ViewModel-react lib with Es7 decorators given we are using libs that use the ES7 decorators i.e https://github.com/azazdeaz/react-gsap-enhancer
-
# 一、概念
标准定义:
>A decorator is: **an expression**
> - that evaluates to a function
> - that takes the target, name, and decorator descriptor as arguments
and optionally returns a decorator descript…
-
ES7 or experimental decorators is something I've seen pop up from time to time with things like
[trine](https://github.com/jussi-kalliokoski/trine/), [megawac/lodash-decorators](https://github.com/meg…
-
```
@withStyles(styles)
class App {...
```
![screenshot](https://cloud.githubusercontent.com/assets/781189/9243946/a53ae92c-4196-11e5-98d2-095dadea6e90.png)
-
# Add Support for ES7/TypeScript Decorators
Per my convo with @jsdevel on Gitter, I'd like to propose adding some implementation for decorators.
## Example
**ZooController.ts**
``` javascript
@cont…
-
I'm trying to run JSDoc on a file that uses a decorator (everything is run through webpack+babel. only jsdoc runs on the raw files and generally handles es6 features in a surprisingly forward manner).…
-
The Ember 2.0 release blog post [states](http://emberjs.com/blog/2015/08/13/ember-2-0-released.html#toc_ember-2-x-themes):
> As the JavaScript decorator proposal stabilizes, and as transpilers improv…
-
Before
![Image](http://croper.ru/images/201511294up2zSbDbBzHtg3z_3d73n_large.png?39973)
After
![Image](http://croper.ru/images/20151129sZhSQUIbNlmFEKOF_AaMzh_large.png?11971)
-
Since our code should be as clear and concise as possible and avoid boilerplate!
So I'd like to use [polymer decorators](https://github.com/gertcuykens/decorators) with FutureScript for beautiful, …