understanding TypeScript access modifiers