I have a constants class that has:
public static final String DATA_TYPE_INTEGER = 'INTEGER';
I tried to access this in my LWC by doing an import like this:
import DATA_TYPE_INTEGER from '@salesforce/apex/ConstantsClass.DATA_TYPE_INTEGER';
.toLowerCase() is not an operation on DATA_TYPE_INTEGER and I can't seem to get any actual string value from it.
I then tried in my apex class for my LWC:
@AuraEnabled public final String DATA_TYPE_INTEGER = ConstantsClass.DATA_TYPE_INTEGER;
And importing that, but got the same issues. I don't think Lightning Components allowed you to access variables like this at all, but was thinking that LWCs might, like they can import custom labels...