ReSharper 2021.1 Help

Context Actions for TypeScript

ReSharper provides the following context actions for TypeScript:

Change visibility modifierChanges visibility of class and module members
Convert field to parameter-propertyIntroduces parameter-property declared as a constructor parameter from class field
Convert 'if' to 'switch' for enumsIf 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 memberType 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 fieldIntroduces field from parameter-property declared in constructor
Create derived typeCreates class that implements interface or inherits class.
Create From UsageCreates class, interface, enum, module, member function or member property from usage
For more information, see Generate Code from Usage.
Create overload without parameterCreates overload signature with an absence of specified parameter. Subsequent parameters in the main signature may be marked as optional if needed.
Create paired accessorCreates paired accessor for currently implemented one
Dotted name to nested moduleCreate 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 elementImports modules, classes, variable, interfaces, enums declared somewhere else
Inline type aliasInlines a type alias, i.e. replaces its usages with the corresponding type and removes the type alias declaration
Introduce type aliasIntroduces a new type alias for selection.
Match file name with type nameRenames current file to match the name of the only top-level type declared therein.
Move type to another file to match its nameMoves current type to another file so that its name matches the name of the type.
Nested module to dotted nameMerges 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 qualifierReplace alias with fully qualified name
Specify return type explicitlySpecify function return type explicitly if it may be derived from returned values
Specify type explicitlySpecify variable type explicitly for declaration with assignment
Last modified: 08 March 2021