-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added further generics to certain methods and functions to ensure t…
…ype compatibility
- Loading branch information
1 parent
a0e1c79
commit 4b13699
Showing
5 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
import { Query } from "./query"; | ||
|
||
export class IncludeQuery extends Query { | ||
private readonly objects: Array<string>; | ||
|
||
public constructor(objects: Array<string>) { | ||
super(); | ||
|
||
this.objects = objects ? objects : []; | ||
} | ||
|
||
public override toString(): string { | ||
throw new Error("Method not implemented."); | ||
let retData: string = ','; | ||
|
||
if (this.objects.length > 0) { | ||
retData = `include=`; | ||
|
||
this.objects.forEach((object: string) => { | ||
retData += `${object},`; | ||
}); | ||
} | ||
|
||
// get rid of the last element | ||
return retData.slice(0, -1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters