makeObservable and Typescript protected and private methods and properties #2490
Replies: 1 comment 6 replies
-
See docs, a generic arg with private keys can be passed in
Op di 6 okt. 2020 23:34 schreef Ivan V. <notifications@github.com>:
… I have protected methods, and I need to make them in to actions however,
the typescript complains that they don't exist.
The code looks like this:
makeObservable(this, {
play: action,
stop: action,
pause: action,
resume: action,
// @ts-ignore - protected methods
disposePlayer: action,
initPlayer: action
})
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2490>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBF5B77RAZ5EHYC4I33SJOLQXANCNFSM4SGUBZ4Q>
.
|
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
ivandotv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have protected methods, and I need to make them in to actions however, the typescript complains that they don't exist.
The code looks like this:
Beta Was this translation helpful? Give feedback.
All reactions