import { LightningElement, wire } from 'lwc';
import { getObjectInfo } from 'lightning/uiObjectInfoApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';
export default class CheckPermission extends LightningElement() {
areAccountVisible = false;
@wire(getObjectInfo, { objectApiName: ACCOUNT_OBJECT })
wiredData({data, error}){
if(data){
this.areAccountVisible = data.queryable;
}
if(error){
}
}
}
this.areAccountVisible = data.queryable;
only, aswire
methods are async in nature.