1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429
|
//// [staticPropertyNameConflicts.ts]
// name
class StaticName {
static name: number; // error
name: string; // ok
}
class StaticNameFn {
static name() {} // error
name() {} // ok
}
// length
class StaticLength {
static length: number; // error
length: string; // ok
}
class StaticLengthFn {
static length() {} // error
length() {} // ok
}
// prototype
class StaticPrototype {
static prototype: number; // error
prototype: string; // ok
}
class StaticPrototypeFn {
static prototype() {} // error
prototype() {} // ok
}
// caller
class StaticCaller {
static caller: number; // error
caller: string; // ok
}
class StaticCallerFn {
static caller() {} // error
caller() {} // ok
}
// arguments
class StaticArguments {
static arguments: number; // error
arguments: string; // ok
}
class StaticArgumentsFn {
static arguments() {} // error
arguments() {} // ok
}
// === Static properties on anonymous classes ===
// name
var StaticName_Anonymous = class {
static name: number; // error
name: string; // ok
}
var StaticNameFn_Anonymous = class {
static name() {} // error
name() {} // ok
}
// length
var StaticLength_Anonymous = class {
static length: number; // error
length: string; // ok
}
var StaticLengthFn_Anonymous = class {
static length() {} // error
length() {} // ok
}
// prototype
var StaticPrototype_Anonymous = class {
static prototype: number; // error
prototype: string; // ok
}
var StaticPrototypeFn_Anonymous = class {
static prototype() {} // error
prototype() {} // ok
}
// caller
var StaticCaller_Anonymous = class {
static caller: number; // error
caller: string; // ok
}
var StaticCallerFn_Anonymous = class {
static caller() {} // error
caller() {} // ok
}
// arguments
var StaticArguments_Anonymous = class {
static arguments: number; // error
arguments: string; // ok
}
var StaticArgumentsFn_Anonymous = class {
static arguments() {} // error
arguments() {} // ok
}
// === Static properties on default exported classes ===
// name
module TestOnDefaultExportedClass_1 {
class StaticName {
static name: number; // error
name: string; // ok
}
}
module TestOnDefaultExportedClass_2 {
class StaticNameFn {
static name() {} // error
name() {} // ok
}
}
// length
module TestOnDefaultExportedClass_3 {
export default class StaticLength {
static length: number; // error
length: string; // ok
}
}
module TestOnDefaultExportedClass_4 {
export default class StaticLengthFn {
static length() {} // error
length() {} // ok
}
}
// prototype
module TestOnDefaultExportedClass_5 {
export default class StaticPrototype {
static prototype: number; // error
prototype: string; // ok
}
}
module TestOnDefaultExportedClass_6 {
export default class StaticPrototypeFn {
static prototype() {} // error
prototype() {} // ok
}
}
// caller
module TestOnDefaultExportedClass_7 {
export default class StaticCaller {
static caller: number; // error
caller: string; // ok
}
}
module TestOnDefaultExportedClass_8 {
export default class StaticCallerFn {
static caller() {} // error
caller() {} // ok
}
}
// arguments
module TestOnDefaultExportedClass_9 {
export default class StaticArguments {
static arguments: number; // error
arguments: string; // ok
}
}
module TestOnDefaultExportedClass_10 {
export default class StaticArgumentsFn {
static arguments() {} // error
arguments() {} // ok
}
}
//// [staticPropertyNameConflicts.js]
// name
var StaticName = /** @class */ (function () {
function StaticName() {
}
return StaticName;
}());
var StaticNameFn = /** @class */ (function () {
function StaticNameFn() {
}
StaticNameFn.name = function () { }; // error
StaticNameFn.prototype.name = function () { }; // ok
return StaticNameFn;
}());
// length
var StaticLength = /** @class */ (function () {
function StaticLength() {
}
return StaticLength;
}());
var StaticLengthFn = /** @class */ (function () {
function StaticLengthFn() {
}
StaticLengthFn.length = function () { }; // error
StaticLengthFn.prototype.length = function () { }; // ok
return StaticLengthFn;
}());
// prototype
var StaticPrototype = /** @class */ (function () {
function StaticPrototype() {
}
return StaticPrototype;
}());
var StaticPrototypeFn = /** @class */ (function () {
function StaticPrototypeFn() {
}
StaticPrototypeFn.prototype = function () { }; // error
StaticPrototypeFn.prototype.prototype = function () { }; // ok
return StaticPrototypeFn;
}());
// caller
var StaticCaller = /** @class */ (function () {
function StaticCaller() {
}
return StaticCaller;
}());
var StaticCallerFn = /** @class */ (function () {
function StaticCallerFn() {
}
StaticCallerFn.caller = function () { }; // error
StaticCallerFn.prototype.caller = function () { }; // ok
return StaticCallerFn;
}());
// arguments
var StaticArguments = /** @class */ (function () {
function StaticArguments() {
}
return StaticArguments;
}());
var StaticArgumentsFn = /** @class */ (function () {
function StaticArgumentsFn() {
}
StaticArgumentsFn.arguments = function () { }; // error
StaticArgumentsFn.prototype.arguments = function () { }; // ok
return StaticArgumentsFn;
}());
// === Static properties on anonymous classes ===
// name
var StaticName_Anonymous = /** @class */ (function () {
function class_1() {
}
return class_1;
}());
var StaticNameFn_Anonymous = /** @class */ (function () {
function StaticNameFn_Anonymous() {
}
StaticNameFn_Anonymous.name = function () { }; // error
StaticNameFn_Anonymous.prototype.name = function () { }; // ok
return StaticNameFn_Anonymous;
}());
// length
var StaticLength_Anonymous = /** @class */ (function () {
function class_2() {
}
return class_2;
}());
var StaticLengthFn_Anonymous = /** @class */ (function () {
function StaticLengthFn_Anonymous() {
}
StaticLengthFn_Anonymous.length = function () { }; // error
StaticLengthFn_Anonymous.prototype.length = function () { }; // ok
return StaticLengthFn_Anonymous;
}());
// prototype
var StaticPrototype_Anonymous = /** @class */ (function () {
function class_3() {
}
return class_3;
}());
var StaticPrototypeFn_Anonymous = /** @class */ (function () {
function StaticPrototypeFn_Anonymous() {
}
StaticPrototypeFn_Anonymous.prototype = function () { }; // error
StaticPrototypeFn_Anonymous.prototype.prototype = function () { }; // ok
return StaticPrototypeFn_Anonymous;
}());
// caller
var StaticCaller_Anonymous = /** @class */ (function () {
function class_4() {
}
return class_4;
}());
var StaticCallerFn_Anonymous = /** @class */ (function () {
function StaticCallerFn_Anonymous() {
}
StaticCallerFn_Anonymous.caller = function () { }; // error
StaticCallerFn_Anonymous.prototype.caller = function () { }; // ok
return StaticCallerFn_Anonymous;
}());
// arguments
var StaticArguments_Anonymous = /** @class */ (function () {
function class_5() {
}
return class_5;
}());
var StaticArgumentsFn_Anonymous = /** @class */ (function () {
function StaticArgumentsFn_Anonymous() {
}
StaticArgumentsFn_Anonymous.arguments = function () { }; // error
StaticArgumentsFn_Anonymous.prototype.arguments = function () { }; // ok
return StaticArgumentsFn_Anonymous;
}());
// === Static properties on default exported classes ===
// name
var TestOnDefaultExportedClass_1;
(function (TestOnDefaultExportedClass_1) {
var StaticName = /** @class */ (function () {
function StaticName() {
}
return StaticName;
}());
})(TestOnDefaultExportedClass_1 || (TestOnDefaultExportedClass_1 = {}));
var TestOnDefaultExportedClass_2;
(function (TestOnDefaultExportedClass_2) {
var StaticNameFn = /** @class */ (function () {
function StaticNameFn() {
}
StaticNameFn.name = function () { }; // error
StaticNameFn.prototype.name = function () { }; // ok
return StaticNameFn;
}());
})(TestOnDefaultExportedClass_2 || (TestOnDefaultExportedClass_2 = {}));
// length
var TestOnDefaultExportedClass_3;
(function (TestOnDefaultExportedClass_3) {
var StaticLength = /** @class */ (function () {
function StaticLength() {
}
return StaticLength;
}());
TestOnDefaultExportedClass_3.StaticLength = StaticLength;
})(TestOnDefaultExportedClass_3 || (TestOnDefaultExportedClass_3 = {}));
var TestOnDefaultExportedClass_4;
(function (TestOnDefaultExportedClass_4) {
var StaticLengthFn = /** @class */ (function () {
function StaticLengthFn() {
}
StaticLengthFn.length = function () { }; // error
StaticLengthFn.prototype.length = function () { }; // ok
return StaticLengthFn;
}());
TestOnDefaultExportedClass_4.StaticLengthFn = StaticLengthFn;
})(TestOnDefaultExportedClass_4 || (TestOnDefaultExportedClass_4 = {}));
// prototype
var TestOnDefaultExportedClass_5;
(function (TestOnDefaultExportedClass_5) {
var StaticPrototype = /** @class */ (function () {
function StaticPrototype() {
}
return StaticPrototype;
}());
TestOnDefaultExportedClass_5.StaticPrototype = StaticPrototype;
})(TestOnDefaultExportedClass_5 || (TestOnDefaultExportedClass_5 = {}));
var TestOnDefaultExportedClass_6;
(function (TestOnDefaultExportedClass_6) {
var StaticPrototypeFn = /** @class */ (function () {
function StaticPrototypeFn() {
}
StaticPrototypeFn.prototype = function () { }; // error
StaticPrototypeFn.prototype.prototype = function () { }; // ok
return StaticPrototypeFn;
}());
TestOnDefaultExportedClass_6.StaticPrototypeFn = StaticPrototypeFn;
})(TestOnDefaultExportedClass_6 || (TestOnDefaultExportedClass_6 = {}));
// caller
var TestOnDefaultExportedClass_7;
(function (TestOnDefaultExportedClass_7) {
var StaticCaller = /** @class */ (function () {
function StaticCaller() {
}
return StaticCaller;
}());
TestOnDefaultExportedClass_7.StaticCaller = StaticCaller;
})(TestOnDefaultExportedClass_7 || (TestOnDefaultExportedClass_7 = {}));
var TestOnDefaultExportedClass_8;
(function (TestOnDefaultExportedClass_8) {
var StaticCallerFn = /** @class */ (function () {
function StaticCallerFn() {
}
StaticCallerFn.caller = function () { }; // error
StaticCallerFn.prototype.caller = function () { }; // ok
return StaticCallerFn;
}());
TestOnDefaultExportedClass_8.StaticCallerFn = StaticCallerFn;
})(TestOnDefaultExportedClass_8 || (TestOnDefaultExportedClass_8 = {}));
// arguments
var TestOnDefaultExportedClass_9;
(function (TestOnDefaultExportedClass_9) {
var StaticArguments = /** @class */ (function () {
function StaticArguments() {
}
return StaticArguments;
}());
TestOnDefaultExportedClass_9.StaticArguments = StaticArguments;
})(TestOnDefaultExportedClass_9 || (TestOnDefaultExportedClass_9 = {}));
var TestOnDefaultExportedClass_10;
(function (TestOnDefaultExportedClass_10) {
var StaticArgumentsFn = /** @class */ (function () {
function StaticArgumentsFn() {
}
StaticArgumentsFn.arguments = function () { }; // error
StaticArgumentsFn.prototype.arguments = function () { }; // ok
return StaticArgumentsFn;
}());
TestOnDefaultExportedClass_10.StaticArgumentsFn = StaticArgumentsFn;
})(TestOnDefaultExportedClass_10 || (TestOnDefaultExportedClass_10 = {}));
|