2.2.2.0 release notes

 2.2.2.0

  • More JavaScript and TypeScript editor experience improvements - Implemented another round of strongly-typed development improvements for JavaScript and TypeScript, again primarily focused on LWC development use cases. Again, these improvements are only applicable when IC2 is paired with a commercial JetBrains IDE.
    • Issue 2102 - Added support for code completion and references for $fieldOrPropertyName expressions in wire decorator configuration string literals. Note, however, that completions and references are not currently supported for expression variants (i.e., chained expressions after dots), only for the first expression.
    • Functions which return HTML elements, e.g., querySelector* and createElement, now return the most specific type of element that can be determined from the provided argument. For standard LWC components this is the component-specific subclass of LightningElement. For custom LWC components this is the default exported LightningElement subclass in the component's primary .js file. For standard HTML elements this is the component-specific subclass of HTMLElement. For all other calls HTMLElement is used. This ensures that component-specific state and behavior can be referenced directly on the results of these calls.
    • Made imported symbols in Jest tests behave like Jest mocks with both the original interface and the MockInstance/TestWireAdapter interfaces as appropriate.
    • Improved representation of generic types in the standard LWC type libraries such that function parameters are typed as Object which can receive any passed value while fields and properties are typed as any which can be assigned to any value, something that's very useful when extracting an otherwise untyped field or property value into a local variable and then using a doc-based type hint to "cast" it to a specific type for strongly-typed usage.
    • Fixed a number of other types in the standard LWC type libraries which were seemingly incorrect based on valid usages in test projects which were flagged by the IDE's inspections.
    • Made the lightning/messageService module much more strongly-typed using synthetic types to help enforce type agreement.
    • Added support for custom component module imports via require.
  • Added inspection suppression for misspellings reported by the spell checker for Salesforce IDs in string literals in both Apex and JavaScript.