Typescript
TSReturnTypePlaceholder
A placeholder class for function return type annotations in TypeScript. This class represents a placeholder for function return type annotations, allowing for modification and addition of return type annotations after the parameter list. It provides functionality to add or modify return type annotations with proper formatting.
View Source on Github
Inherits from
Methods
edit
Modifies the return type annotation of a function.
View Source on Github
Parameters
new_src
str
required
The return type annotation to add. If it doesn't start with ':', a ':' will be prepended.
fix_indentation
bool, optional
default:False
Whether to fix the indentation of the added code. Defaults to False.
priority
int, optional
default:0
The priority of this edit. Defaults to 0.
dedupe
bool, optional
default:True
Whether to remove duplicate edits. Defaults to True.
Returns
None
remove
Removes this element from its parent container.
View Source on Github
Returns
None
Was this page helpful?