I'm filing a nonresident CA return I live in IL. I see some posts say I can deduct my HSA via misc. adj. (2019) because i'm a NR. Is this valid or no?

My IL employer contributed to my HSA.  Am I able to deduct my HSA via Misc. Adjustment like some posts say so back in 2019?  This is for my 2023 taxes.