For future readers, We can use getter to allow reading property outside class, but restrict edit.
class Test {
private x_ = new Uint8Array([0, 1, 2]);
get x() {
return this.x_;
}
}
let test = new Test();
console.log(test.x) //Can read
test.x = 1; //Error: Cannot assign to 'x' because it is a read-only property.