I've inherited some typescript components in an Angular project, some of which are thousands of lines long. How can I go about a refactor that allows me to move methods into other files and call them from the component? For example, something like
InitialiseSearchFilter() {
this.searchListFilter.PageNumber = 1;
this.searchListFilter.PageSize = 20;
this.searchListFilter.SortOrder = "asc";
}
I would like to move out of the component and into a different file, which I can reference from the component, for file size and readability purposes.