Context Actions for TypeScript
ReSharper provides the following context actions for TypeScript:
|Change visibility modifier
|Changes visibility of class and module members
|Convert field to parameter-property
|Introduces parameter-property declared as a constructor parameter from class field
|Convert 'if' to 'switch' for enums
|If a variable is subsequently checked in 'if's with enum values, that may be replaced with a switch
|Convert member assigned by a lambda expression to function member
|Type member, which is assigned by a lambda expression, generally may be converted to function member. Not guaranteed to work correctly if you have implicit method invocations via 'apply'.
|Convert parameter-property to field
|Introduces field from parameter-property declared in constructor
|Create derived type
|Creates class that implements interface or inherits class.
|Create From Usage
|Creates class, interface, enum, module, member function or member property from usage
For more information, see Generate Code from Usage.
|Create overload without parameter
|Creates overload signature with an absence of specified parameter. Subsequent parameters in the main signature may be marked as optional if needed.
|Create paired accessor
|Creates paired accessor for currently implemented one
|Dotted name to nested module
|Create nested module for dotted name segment. For example, converts 'module A.B.C' to 'module 'A.B' with nested module 'C'.
|Import type or type element
|Imports modules, classes, variable, interfaces, enums declared somewhere else
|Inline type alias
|Inlines a type alias, i.e. replaces its usages with the corresponding type and removes the type alias declaration
|Introduce type alias
|Introduces a new type alias for selection.
|Match file name with type name
|Renames current file to match the name of the only top-level type declared therein.
|Move type to another file to match its name
|Moves current type to another file so that its name matches the name of the type.
|Nested module to dotted name
|Merges nested single exported module as dotted name. For example, converts 'module A.B' with nested exported 'module C' to 'module A.B.C'.
|Replace alias with qualifier
|Replace alias with fully qualified name
|Specify return type explicitly
|Specify function return type explicitly if it may be derived from returned values
|Specify type explicitly
|Specify variable type explicitly for declaration with assignment
Last modified: 08 March 2021