|
| 1 | +//// [tests/cases/compiler/decoratorMetadataTypeOnlyExport.ts] //// |
| 2 | + |
| 3 | +//// [a.ts] |
| 4 | +class Foo {} |
| 5 | +export type { Foo }; |
| 6 | + |
| 7 | +//// [b.ts] |
| 8 | +import { Foo } from "./a"; |
| 9 | + |
| 10 | +const Decorator: ClassDecorator = () => undefined; |
| 11 | + |
| 12 | +@Decorator |
| 13 | +class Bar { |
| 14 | + constructor(par: Foo) {} |
| 15 | +} |
| 16 | + |
| 17 | + |
| 18 | +//// [a.js] |
| 19 | +"use strict"; |
| 20 | +Object.defineProperty(exports, "__esModule", { value: true }); |
| 21 | +var Foo = /** @class */ (function () { |
| 22 | + function Foo() { |
| 23 | + } |
| 24 | + return Foo; |
| 25 | +}()); |
| 26 | +//// [b.js] |
| 27 | +"use strict"; |
| 28 | +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { |
| 29 | + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 30 | + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 31 | + 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; |
| 32 | + return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 33 | +}; |
| 34 | +var __metadata = (this && this.__metadata) || function (k, v) { |
| 35 | + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); |
| 36 | +}; |
| 37 | +Object.defineProperty(exports, "__esModule", { value: true }); |
| 38 | +var Decorator = function () { return undefined; }; |
| 39 | +var Bar = /** @class */ (function () { |
| 40 | + function Bar(par) { |
| 41 | + } |
| 42 | + Bar = __decorate([ |
| 43 | + Decorator, |
| 44 | + __metadata("design:paramtypes", [Function]) |
| 45 | + ], Bar); |
| 46 | + return Bar; |
| 47 | +}()); |
0 commit comments