|
| 1 | +//// [tests/cases/compiler/decoratorMetadataElidedImportOnDeclare.ts] //// |
| 2 | + |
| 3 | +//// [observable.d.ts] |
| 4 | +export declare class Observable<T> {} |
| 5 | + |
| 6 | +//// [index.ts] |
| 7 | +import { Observable } from './observable'; |
| 8 | + |
| 9 | +function whatever(a: any, b: any) {} |
| 10 | + |
| 11 | +class Test { |
| 12 | + @whatever |
| 13 | + declare prop: Observable<string>; |
| 14 | +} |
| 15 | + |
| 16 | + |
| 17 | +//// [index.js] |
| 18 | +"use strict"; |
| 19 | +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { |
| 20 | + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 21 | + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 22 | + 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; |
| 23 | + return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 24 | +}; |
| 25 | +var __metadata = (this && this.__metadata) || function (k, v) { |
| 26 | + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); |
| 27 | +}; |
| 28 | +Object.defineProperty(exports, "__esModule", { value: true }); |
| 29 | +const observable_1 = require("./observable"); |
| 30 | +function whatever(a, b) { } |
| 31 | +class Test { |
| 32 | +} |
| 33 | +__decorate([ |
| 34 | + whatever, |
| 35 | + __metadata("design:type", observable_1.Observable) |
| 36 | +], Test.prototype, "prop", void 0); |
0 commit comments