mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
parent
4a33c349af
commit
cf9fb18494
4 changed files with 122 additions and 159 deletions
|
@ -3,12 +3,12 @@
|
|||
// deno-lint-ignore-file
|
||||
// This code was bundled using `deno bundle` and it's not recommended to edit it manually
|
||||
|
||||
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
||||
function _ts_decorate(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 a() {
|
||||
console.log("a(): evaluated");
|
||||
return (_target, _propertyKey, _descriptor)=>{
|
||||
|
@ -20,15 +20,15 @@ class B {
|
|||
console.log("method");
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
_ts_decorate([
|
||||
a()
|
||||
], B.prototype, "method", null);
|
||||
var __decorate1 = this && this.__decorate || function(decorators, target, key, desc) {
|
||||
function _ts_decorate1(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 Decorator() {
|
||||
return function(target, propertyKey, descriptor) {
|
||||
const originalFn = descriptor.value;
|
||||
|
@ -41,7 +41,7 @@ function Decorator() {
|
|||
class SomeClass {
|
||||
async test() {}
|
||||
}
|
||||
__decorate1([
|
||||
_ts_decorate1([
|
||||
Decorator()
|
||||
], SomeClass.prototype, "test", null);
|
||||
new SomeClass().test();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue