Hello Everyone! I want to clarify one thing. Curr...
# general
Hello Everyone! I want to clarify one thing. Currently, I'm passing a Promise to the chart's "skipCRDRendering" property. My code seems to work, and it looks like that although this property accepts only boolean, internally, it handles the Promises too. Am I right? P.S. I'm using Typescript.
How is your code passing the type checks if you are passing a
to a
? The field should be
if it accepts Promises, Outputs, etc. The equality operator is able to be used with Promises, but it won't necessarily give you what you want. For example,
new Promise(()={}) == <true or false>
will both give you
I just trick the compiler with type casting.
Copy code
// prometheusCrdsExistence: Promise<boolean>;

skipCRDRendering: <boolean><unknown>cluster.crdsInitModule?.prometheusCrdsExistence.then(
    result => { return result }
And the promise handling works because of this, if I'm not mistaken