T
TanStack•3y ago
manual-pink

instance hidden properties

there are properties that I can see on the instance. like getSize, scrollRect etc but Typescript doesn't know about them are they valid to use? or internal state?
3 Replies
dependent-tan
dependent-tan•3y ago
They are marked as private in TS, that's why ts warns you, overall it's not safe to use private properties as they are not part of public api. Overall was was wondering about exposing scrollRect 🤔
manual-pink
manual-pinkOP•3y ago
or getSize? I'd go with getSize() but they aren't private in the ES6 class?
dependent-tan
dependent-tan•3y ago
but they aren't private in the ES6 class?
no they aren't

Did you find this page helpful?