Skip to content

Commit

Permalink
Reorder overloads to give plural precedence over singular
Browse files Browse the repository at this point in the history
  • Loading branch information
daogrady committed Jan 18, 2024
1 parent cf41893 commit c4b3714
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis/ql.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ export type StaticSELECT<T> = typeof SELECT
& ((...columns: string[]) => SELECT<T>)
& ((columns: string[]) => SELECT<T>)
& (TaggedTemplateQueryPart<SELECT<T>>)
& SELECT_one // as it is not directly quantified, ...
& SELECT_from // ...we should expect both a scalar and a list
& SELECT_from // as it is not directly quantified, ...
& SELECT_one // ...we should expect both a scalar and a list

declare class QL<T> {

Expand Down
2 changes: 2 additions & 0 deletions test/typescript/apis/project/cds-ql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ s.SELECT.columns?.[0].ref
s.SELECT.where?.[0].ref
s.SELECT.where?.[2].val

SELECT(Foos) === SELECT.from(Foos)

INSERT.into(Foos).columns("x") // x was suggested by code completion
let ins: INSERT<Foo>
ins = INSERT.into(Foos, {})
Expand Down

0 comments on commit c4b3714

Please sign in to comment.