mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Updated emit for __decorator and __metadata helpers
This commit is contained in:
@@ -34,7 +34,8 @@ var __extends = this.__extends || function (d, b) {
|
||||
|
||||
// emit output for the __decorate helper function
|
||||
const decorateHelper = `
|
||||
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate = this.__decorate || function (decorators, target, key, desc) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
|
||||
switch (arguments.length) {
|
||||
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
|
||||
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
|
||||
@@ -44,7 +45,9 @@ var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.deco
|
||||
|
||||
// emit output for the __metadata helper function
|
||||
const metadataHelper = `
|
||||
var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { };`;
|
||||
var __metadata = this.__metadata || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};`;
|
||||
|
||||
// emit output for the __param helper function
|
||||
const paramHelper = `
|
||||
|
||||
Reference in New Issue
Block a user