File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,18 @@ export type ExecuteApiFetch = (
8484) => void ;
8585/* eslint-enable @typescript-eslint/no-explicit-any */
8686
87+ /**
88+ * Helper function to convert a setting to a query parameter string
89+ */
90+ /* eslint-disable @typescript-eslint/no-explicit-any */
91+ const settingToQueryParam = function ( setting : any , key : string ) : string {
92+ if ( setting || setting === false ) {
93+ return '&' + key + '=' + setting ;
94+ }
95+ return '' ;
96+ } ;
97+ /* eslint-enable @typescript-eslint/no-explicit-any */
98+
8799/**
88100 * Fetch search results of search suggestions from the Addsearch API
89101 */
@@ -97,15 +109,6 @@ const executeApiFetch: ExecuteApiFetch = function (
97109 customFilterObject ,
98110 recommendOptions
99111) {
100- /* eslint-disable @typescript-eslint/no-explicit-any */
101- const settingToQueryParam = function ( setting : any , key : string ) {
102- if ( setting || setting === false ) {
103- return '&' + key + '=' + setting ;
104- }
105- return '' ;
106- } ;
107- /* eslint-enable @typescript-eslint/no-explicit-any */
108-
109112 // Validate query type
110113 if (
111114 type !== 'search' &&
You can’t perform that action at this time.
0 commit comments