7 lines
No EOL
184 B
TypeScript
7 lines
No EOL
184 B
TypeScript
// Shouldn't be able to index a class instance by a number (unless it has declared a number index signature)
|
|
|
|
class foo { }
|
|
|
|
var f = new foo();
|
|
|
|
f[0] = 4; // Shouldn't be allowed
|