-
Notifications
You must be signed in to change notification settings - Fork 2
Helper types
Helper types are types that normally doesn't exist but they can enhance JavaScript autocomplete.
Salesforce namespace contains helper types related to Salesforce instance properties, like one that represents Tab API names.
Type containing all existing tab's API names.
/** @type {Salesforce.TabApiName} */
Type containing all existing flows names. Useful for new component, "lightning-flow".
/** @type {Salesforce.FlowApiName} */
Type containing all existing apps's API names.
/** @type {Salesforce.ApplicationApiName} */
Namespace containing types representing global picklist values. For example, if you have global picklist value set with API name "MyPicklist", you can use:
/** @type {Salesforce.GlobalValueSets.MyPicklist */
const value = "value from picklist";
Helper types in this namespace are related to SObjects and its properties.
Type containing all API names of SObjects in org/sandbox. Can be used on "objectApiName" property, like this:
/** @type {schema.SObjectApiName} */
@api objectApiName
Map in with:
- keys representing SObjects API names
- values representing SObject interface
Lightning namespace contains special types that only have meaning in lwc environment.
All page reference types are stored in special map named PageRefereceTypes. Keys in this map represent specific page reference identifiers.
/** @type {lightning.navigation.PageReferenceTypes["standard__objectPage"]} */
const sobjectPagePageReference = {
}