Giter Site home page Giter Site logo

关于装饰器章节这个说法的疑问:「装饰器对类的行为的改变,是代码编译时发生的,而不是在运行时」 about es6tutorial HOT 1 CLOSED

xcatliu avatar xcatliu commented on May 21, 2024
关于装饰器章节这个说法的疑问:「装饰器对类的行为的改变,是代码编译时发生的,而不是在运行时」

from es6tutorial.

Comments (1)

ruanyf avatar ruanyf commented on May 21, 2024 1

JS 引擎以前不支持装饰器,“编译”就是指在 Babel/TS 转换代码时,会处理掉装饰器。

JS 引擎现在支持了,这样说就不对了,应该说装饰器是在引擎“评估”(evalute)代码时执行。我把这行删了。

from es6tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.