getList method with type filtering

This commit is contained in:
mmacierzanka committed 2021-09-05 16:18:45 +02:00
1 parent 332a1dec97
commit c4b7dc3c44
4 files changed
+29 -11

No files matched your search

+2
View File
@@ -106,6 +106,8 @@ export class BaseCommand {
}
}
public toObject() {}
private createAccessor(args: InputParameter[]) {
return function (query: string, returnType?: "value" | "object") {
return returnType === "object" ? args.find((p) => p.name === query) || null : args.find((p) => p.name === query)?.value || null;