Consider the following little snippet:
class BlueprintNode {
private metadata: number[] = [];
}
var node = new BlueprintNode();
node["metadata"].push("Access violation, rangers lead the way.");
How come the TypeScript compiler allows access to a private member through the use of the square-bracket notation? It even correctly detects the type of the given property. With the dot notation, it displays a compile error correctly.