Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
j3lte committed Apr 12, 2023
1 parent 282f4e1 commit 1e3a4dd
Show file tree
Hide file tree
Showing 6 changed files with 793 additions and 792 deletions.
6 changes: 3 additions & 3 deletions src/Query.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Where } from "./Where.ts";
import { toQS } from "./utils/qs.ts";
import { SelectObject } from "./Select.ts";
import { SelectImpl } from "./SelectImpl.ts";
import { Order } from "./Order.ts";
import { addExpr, expr } from "./utils/expr.ts";
import { FieldImpl } from "./Field.ts";
Expand Down Expand Up @@ -299,10 +299,10 @@ export class SodaQuery<T> {
return this;
}

select(...selects: Array<string | SelectObject | FieldImpl>): this {
select(...selects: Array<string | SelectImpl | FieldImpl>): this {
const selectArray = selects.map((
s,
) => (s instanceof SelectObject ? s.value : (typeof s === "object" ? s.name : s))).filter((s) =>
) => (s instanceof SelectImpl ? s.value : (typeof s === "object" ? s.name : s))).filter((s) =>
s
);
this.#select.push(...selectArray);
Expand Down
Loading

0 comments on commit 1e3a4dd

Please sign in to comment.