|
| 1 | +/a/lib/tsc.js -w |
| 2 | +//// [/a/lib/lib.d.ts] |
| 3 | +/// <reference no-default-lib="true"/> |
| 4 | +interface Boolean {} |
| 5 | +interface Function {} |
| 6 | +interface CallableFunction {} |
| 7 | +interface NewableFunction {} |
| 8 | +interface IArguments {} |
| 9 | +interface Number { toExponential: any; } |
| 10 | +interface Object {} |
| 11 | +interface RegExp {} |
| 12 | +interface String { charAt: any; } |
| 13 | +interface Array<T> { length: number; [n: number]: T; } |
| 14 | + |
| 15 | +//// [/a.ts] |
| 16 | +import {B} from './b' |
| 17 | +@((_) => {}) |
| 18 | +export class A { |
| 19 | + constructor(p: B) {} |
| 20 | +} |
| 21 | + |
| 22 | +//// [/b.ts] |
| 23 | +export class B {} |
| 24 | + |
| 25 | +//// [/tsconfig.json] |
| 26 | +{"compilerOptions":{"target":"es6","importsNotUsedAsValues":"error"}} |
| 27 | + |
| 28 | +//// [/b.js] |
| 29 | +export class B { |
| 30 | +} |
| 31 | + |
| 32 | + |
| 33 | +//// [/a.js] |
| 34 | +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { |
| 35 | + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 36 | + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 37 | + 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; |
| 38 | + return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 39 | +}; |
| 40 | +import './b'; |
| 41 | +let A = class A { |
| 42 | + constructor(p) { } |
| 43 | +}; |
| 44 | +A = __decorate([ |
| 45 | + ((_) => { }) |
| 46 | +], A); |
| 47 | +export { A }; |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +Output:: |
| 52 | +>> Screen clear |
| 53 | +12:00:15 AM - Starting compilation in watch mode... |
| 54 | + |
| 55 | + |
| 56 | +a.ts(1,1): error TS1371: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'. |
| 57 | + |
| 58 | +a.ts(3,14): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. |
| 59 | + |
| 60 | + |
| 61 | +12:00:20 AM - Found 2 errors. Watching for file changes. |
| 62 | + |
| 63 | + |
| 64 | +Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] |
| 65 | +Program options: {"target":2,"importsNotUsedAsValues":2,"watch":true,"configFilePath":"/tsconfig.json"} |
| 66 | +Program files:: |
| 67 | +/b.ts |
| 68 | +/a.ts |
| 69 | +/a/lib/lib.d.ts |
| 70 | + |
| 71 | +Semantic diagnostics in builder refreshed for:: |
| 72 | +/b.ts |
| 73 | +/a.ts |
| 74 | +/a/lib/lib.d.ts |
| 75 | + |
| 76 | +WatchedFiles:: |
| 77 | +/tsconfig.json: |
| 78 | + {"pollingInterval":250} |
| 79 | +/a.ts: |
| 80 | + {"pollingInterval":250} |
| 81 | +/b.ts: |
| 82 | + {"pollingInterval":250} |
| 83 | +/a/lib/lib.d.ts: |
| 84 | + {"pollingInterval":250} |
| 85 | + |
| 86 | +FsWatches:: |
| 87 | + |
| 88 | +FsWatchesRecursive:: |
| 89 | +/: |
| 90 | + {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} |
| 91 | + |
| 92 | +exitCode:: ExitStatus.undefined |
| 93 | + |
| 94 | +Change:: Enable experimentalDecorators |
| 95 | + |
| 96 | +//// [/tsconfig.json] |
| 97 | +{"compilerOptions":{"target":"es6","importsNotUsedAsValues":"error","experimentalDecorators":true}} |
| 98 | + |
| 99 | + |
| 100 | +Output:: |
| 101 | +>> Screen clear |
| 102 | +12:00:23 AM - File change detected. Starting incremental compilation... |
| 103 | + |
| 104 | + |
| 105 | +a.ts(1,1): error TS1371: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'. |
| 106 | + |
| 107 | + |
| 108 | +12:00:24 AM - Found 1 error. Watching for file changes. |
| 109 | + |
| 110 | + |
| 111 | +Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] |
| 112 | +Program options: {"target":2,"importsNotUsedAsValues":2,"experimentalDecorators":true,"watch":true,"configFilePath":"/tsconfig.json"} |
| 113 | +Program files:: |
| 114 | +/b.ts |
| 115 | +/a.ts |
| 116 | +/a/lib/lib.d.ts |
| 117 | + |
| 118 | +Semantic diagnostics in builder refreshed for:: |
| 119 | +/b.ts |
| 120 | +/a.ts |
| 121 | +/a/lib/lib.d.ts |
| 122 | + |
| 123 | +WatchedFiles:: |
| 124 | +/tsconfig.json: |
| 125 | + {"pollingInterval":250} |
| 126 | +/a.ts: |
| 127 | + {"pollingInterval":250} |
| 128 | +/b.ts: |
| 129 | + {"pollingInterval":250} |
| 130 | +/a/lib/lib.d.ts: |
| 131 | + {"pollingInterval":250} |
| 132 | + |
| 133 | +FsWatches:: |
| 134 | + |
| 135 | +FsWatchesRecursive:: |
| 136 | +/: |
| 137 | + {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} |
| 138 | + |
| 139 | +exitCode:: ExitStatus.undefined |
| 140 | + |
| 141 | +Change:: Enable emitDecoratorMetadata |
| 142 | + |
| 143 | +//// [/tsconfig.json] |
| 144 | +{"compilerOptions":{"target":"es6","importsNotUsedAsValues":"error","experimentalDecorators":true,"emitDecoratorMetadata":true}} |
| 145 | + |
| 146 | +//// [/b.js] file written with same contents |
| 147 | +//// [/a.js] |
| 148 | +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { |
| 149 | + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 150 | + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 151 | + 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; |
| 152 | + return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 153 | +}; |
| 154 | +var __metadata = (this && this.__metadata) || function (k, v) { |
| 155 | + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); |
| 156 | +}; |
| 157 | +import { B } from './b'; |
| 158 | +let A = class A { |
| 159 | + constructor(p) { } |
| 160 | +}; |
| 161 | +A = __decorate([ |
| 162 | + ((_) => { }), |
| 163 | + __metadata("design:paramtypes", [B]) |
| 164 | +], A); |
| 165 | +export { A }; |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | +Output:: |
| 170 | +>> Screen clear |
| 171 | +12:00:27 AM - File change detected. Starting incremental compilation... |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | +12:00:34 AM - Found 0 errors. Watching for file changes. |
| 176 | + |
| 177 | + |
| 178 | +Program root files: ["/a.ts","/b.ts","/a/lib/lib.d.ts"] |
| 179 | +Program options: {"target":2,"importsNotUsedAsValues":2,"experimentalDecorators":true,"emitDecoratorMetadata":true,"watch":true,"configFilePath":"/tsconfig.json"} |
| 180 | +Program files:: |
| 181 | +/b.ts |
| 182 | +/a.ts |
| 183 | +/a/lib/lib.d.ts |
| 184 | + |
| 185 | +Semantic diagnostics in builder refreshed for:: |
| 186 | +/b.ts |
| 187 | +/a.ts |
| 188 | +/a/lib/lib.d.ts |
| 189 | + |
| 190 | +WatchedFiles:: |
| 191 | +/tsconfig.json: |
| 192 | + {"pollingInterval":250} |
| 193 | +/a.ts: |
| 194 | + {"pollingInterval":250} |
| 195 | +/b.ts: |
| 196 | + {"pollingInterval":250} |
| 197 | +/a/lib/lib.d.ts: |
| 198 | + {"pollingInterval":250} |
| 199 | + |
| 200 | +FsWatches:: |
| 201 | + |
| 202 | +FsWatchesRecursive:: |
| 203 | +/: |
| 204 | + {"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} |
| 205 | + |
| 206 | +exitCode:: ExitStatus.undefined |
0 commit comments