Skip to content

Commit 71c2138

Browse files
authored
perf(module:select): remove unused types (#7850)
1 parent 6d0032e commit 71c2138

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/select/select-top-control.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class NzSelectTopControlComponent implements OnChanges, OnInit, OnDestroy
138138
}
139139

140140
tokenSeparate(inputValue: string, tokenSeparators: string[]): void {
141-
const includesSeparators = (str: string | string[], separators: string[]): boolean => {
141+
const includesSeparators = (str: string, separators: string[]): boolean => {
142142
// eslint-disable-next-line @typescript-eslint/prefer-for-of
143143
for (let i = 0; i < separators.length; ++i) {
144144
if (str.lastIndexOf(separators[i]) > 0) {
@@ -147,9 +147,9 @@ export class NzSelectTopControlComponent implements OnChanges, OnInit, OnDestroy
147147
}
148148
return false;
149149
};
150-
const splitBySeparators = (str: string | string[], separators: string[]): string[] => {
150+
const splitBySeparators = (str: string, separators: string[]): string[] => {
151151
const reg = new RegExp(`[${separators.join()}]`);
152-
const array = (str as string).split(reg).filter(token => token);
152+
const array = str.split(reg).filter(token => token);
153153
return [...new Set(array)];
154154
};
155155
if (

0 commit comments

Comments
 (0)