Skip to content

Commit

Permalink
perf(module:select): remove unused types (#7850)
Browse files Browse the repository at this point in the history
  • Loading branch information
xucr11 authored Jul 16, 2023
1 parent 6d0032e commit 71c2138
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/select/select-top-control.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class NzSelectTopControlComponent implements OnChanges, OnInit, OnDestroy
}

tokenSeparate(inputValue: string, tokenSeparators: string[]): void {
const includesSeparators = (str: string | string[], separators: string[]): boolean => {
const includesSeparators = (str: string, separators: string[]): boolean => {
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < separators.length; ++i) {
if (str.lastIndexOf(separators[i]) > 0) {
Expand All @@ -147,9 +147,9 @@ export class NzSelectTopControlComponent implements OnChanges, OnInit, OnDestroy
}
return false;
};
const splitBySeparators = (str: string | string[], separators: string[]): string[] => {
const splitBySeparators = (str: string, separators: string[]): string[] => {
const reg = new RegExp(`[${separators.join()}]`);
const array = (str as string).split(reg).filter(token => token);
const array = str.split(reg).filter(token => token);
return [...new Set(array)];
};
if (
Expand Down

0 comments on commit 71c2138

Please sign in to comment.