Skip to content

Commit

Permalink
fix: View.find return type
Browse files Browse the repository at this point in the history
  • Loading branch information
taorepoara committed Sep 19, 2023
1 parent 20e1b4d commit 2f167f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/components/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export function View(name: ViewName): ViewImpl {

export class ViewImpl extends ViewBaseImpl {
// Add here custom implementations
find<T extends Data>(coll: Class<T>, query: Query, projection?: { [k: string]: unknown })
find(coll: string, query: Query, projection?: { [k: string]: unknown })
find(find: IView['find'])
find(param1: string | Class<Data> | IView['find'], query?: Query, projection?: { [k: string]: unknown }) {
find<T extends Data>(coll: Class<T>, query: Query, projection?: { [k: string]: unknown }): this
find(coll: string, query: Query, projection?: { [k: string]: unknown }): this
find(find: IView['find']): this
find(param1: string | Class<Data> | IView['find'], query?: Query, projection?: { [k: string]: unknown }): this {
if (typeof param1 === "function") {
param1 = DataApi.collectionName(<Class<Data>>param1);
}
Expand Down

0 comments on commit 2f167f3

Please sign in to comment.