Skip to content

Commit 02948b7

Browse files
removed query casting in ts
1 parent edfd144 commit 02948b7

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

templates/deno/src/query.ts.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class Query {
207207
* @returns {string}
208208
*/
209209
static distanceEqual = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
210-
new Query("distanceEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
210+
new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
211211

212212
/**
213213
* Filter resources where attribute is not at a specific distance from the given coordinates.
@@ -219,7 +219,7 @@ export class Query {
219219
* @returns {string}
220220
*/
221221
static distanceNotEqual = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
222-
new Query("distanceNotEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
222+
new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
223223

224224
/**
225225
* Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
@@ -231,7 +231,7 @@ export class Query {
231231
* @returns {string}
232232
*/
233233
static distanceGreaterThan = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
234-
new Query("distanceGreaterThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
234+
new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
235235

236236
/**
237237
* Filter resources where attribute is at a distance less than the specified value from the given coordinates.
@@ -243,7 +243,7 @@ export class Query {
243243
* @returns {string}
244244
*/
245245
static distanceLessThan = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
246-
new Query("distanceLessThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
246+
new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
247247

248248
/**
249249
* Filter resources where attribute intersects with the given geometry.

templates/react-native/src/query.ts.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class Query {
204204
* @returns {string}
205205
*/
206206
static distanceEqual = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
207-
new Query("distanceEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
207+
new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
208208

209209
/**
210210
* Filter resources where attribute is not at a specific distance from the given coordinates.
@@ -216,7 +216,7 @@ export class Query {
216216
* @returns {string}
217217
*/
218218
static distanceNotEqual = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
219-
new Query("distanceNotEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
219+
new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
220220

221221
/**
222222
* Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
@@ -228,7 +228,7 @@ export class Query {
228228
* @returns {string}
229229
*/
230230
static distanceGreaterThan = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
231-
new Query("distanceGreaterThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
231+
new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
232232

233233
/**
234234
* Filter resources where attribute is at a distance less than the specified value from the given coordinates.
@@ -240,7 +240,7 @@ export class Query {
240240
* @returns {string}
241241
*/
242242
static distanceLessThan = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
243-
new Query("distanceLessThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
243+
new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
244244

245245
/**
246246
* Filter resources where attribute intersects with the given geometry.

templates/web/src/query.ts.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ export class Query {
357357
* @returns {string}
358358
*/
359359
static distanceEqual = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
360-
new Query("distanceEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
360+
new Query("distanceEqual", attribute, [[values, distance, meters]]).toString();
361361

362362
/**
363363
* Filter resources where attribute is not at a specific distance from the given coordinates.
@@ -369,7 +369,7 @@ export class Query {
369369
* @returns {string}
370370
*/
371371
static distanceNotEqual = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
372-
new Query("distanceNotEqual", attribute, [[values, distance, meters]] as QueryTypesList).toString();
372+
new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
373373

374374
/**
375375
* Filter resources where attribute is at a distance greater than the specified value from the given coordinates.
@@ -381,7 +381,7 @@ export class Query {
381381
* @returns {string}
382382
*/
383383
static distanceGreaterThan = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
384-
new Query("distanceGreaterThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
384+
new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
385385

386386
/**
387387
* Filter resources where attribute is at a distance less than the specified value from the given coordinates.
@@ -393,7 +393,7 @@ export class Query {
393393
* @returns {string}
394394
*/
395395
static distanceLessThan = (attribute: string, values: any[], distance: number, meters: boolean = false): string =>
396-
new Query("distanceLessThan", attribute, [[values, distance, meters]] as QueryTypesList).toString();
396+
new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
397397

398398
/**
399399
* Filter resources where attribute intersects with the given geometry.

0 commit comments

Comments
 (0)