Decorador_clase 1

In this example below you will see how to do a Decorador_clase 1 with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 0utKast, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 0utKast ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Decorador_clase 1</title>
  
  
  
  
  
</head>

<body>

  
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/0utKast/decorador_clase-1-pbBkZO */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
function Bienvenida(target) {
    target.prototype.saludo = function () {
        console.log('¡Hola!');
    };
}
var Saludar = (function () {
    function Saludar() {
        // Implementación va aquí...
    }
    Saludar = __decorate([
        Bienvenida
    ], Saludar);
    return Saludar;
}());
var miSaludo = new Saludar();
miSaludo.saludo(); // La consola mostrará  '¡Hola!'

Comments