1- /// <reference path="..\dg.xrmquery.web.ts" />
1+ // eslint-disable-next-line @typescript-eslint/no-namespace, @typescript-eslint/no-unused-vars
22namespace Filter {
33 const GUID_ENDING = "_value" ;
44 const GUID_START = "_" ;
@@ -39,21 +39,24 @@ namespace Filter {
3939 */
4040 function queryFunc < T > ( funcName : string , val1 : T ) : WebFilter ;
4141 function queryFunc < T , V > ( funcName : string , val1 : T , val2 : V ) : WebFilter ;
42+ // eslint-disable-next-line no-inner-declarations
4243 function queryFunc < T , V > ( funcName : string , val1 : T , val2 ?: V ) : WebFilter {
4344 if ( val2 !== undefined ) {
44- return < WebFilter > < any > ( `Microsoft.Dynamics.CRM.${ funcName } (PropertyName='${ parsePropertyName ( getVal ( val1 ) ) } ',PropertyValues=${ getVal ( val2 ) } )` ) ;
45+ return < WebFilter > < any > ( `Microsoft.Dynamics.CRM.${ funcName } (PropertyName='${ parsePropertyName ( getVal ( val1 ) ) } ',PropertyValues=${ getVal ( val2 ) } )` ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
4546 } else {
46- return < WebFilter > < any > ( `Microsoft.Dynamics.CRM.${ funcName } (PropertyName='${ parsePropertyName ( getVal ( val1 ) ) } ')` ) ;
47+ return < WebFilter > < any > ( `Microsoft.Dynamics.CRM.${ funcName } (PropertyName='${ parsePropertyName ( getVal ( val1 ) ) } ')` ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
4748 }
4849 }
4950
51+ // eslint-disable-next-line no-inner-declarations
5052 function parsePropertyName ( name : string ) {
5153 const idxStart = name . indexOf ( GUID_START ) ;
5254 const idxEnd = name . indexOf ( GUID_ENDING ) ;
5355 if ( idxStart === - 1 || idxEnd === - 1 ) return name ;
5456 return `${ name . substr ( idxStart + 1 , idxEnd - 1 ) } ` ;
5557 }
5658
59+ // eslint-disable-next-line no-inner-declarations, @typescript-eslint/no-explicit-any
5760 function getVal ( v : any ) : string {
5861 if ( v === null ) return "null" ;
5962 if ( typeof v === "string" ) return `'${ encodeSpecialCharacters ( v ) } '` ;
@@ -65,6 +68,7 @@ namespace Filter {
6568 /**
6669 * @internal
6770 */
71+ // eslint-disable-next-line no-inner-declarations
6872 function encodeSpecialCharacters ( queryString : string ) {
6973 return encodeURI ( queryString )
7074 . replace ( / ' / g, "''" )
0 commit comments