1
+ // Type definitions for fromjs v2.1.6.1
2
+ // Project: https://github.com/suckgamony/fromjs
3
+ // Definitions by: Glenn Dierckx <https://github.com/glenndierckx>
4
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+
6
+ declare function from < T > ( results : Array < T > ) : FromJS . IQueryable < T > ;
7
+ declare function from < T > ( results : any ) : FromJS . IQueryable < any > ;
8
+
9
+ declare module FromJS {
10
+ export interface IOrderedQueryable < T > extends IQueryable < T > {
11
+ thenBy < TResult > ( item : ( item : T ) => TResult ) : IOrderedQueryable < T > ;
12
+ thenByDesc < TResult > ( item : ( item : T ) => TResult ) : IOrderedQueryable < T > ;
13
+ }
14
+
15
+ export interface IQueryable < T > {
16
+ where ( predicate : ( item : T ) => boolean ) : IQueryable < T > ;
17
+ select < TResult > ( item : ( item : T ) => TResult ) : IQueryable < TResult > ;
18
+ orderByDesc < TResult > ( item : ( item : T ) => TResult ) : IOrderedQueryable < T > ;
19
+ orderBy < TResult > ( item : ( item : T ) => TResult ) : IOrderedQueryable < T > ;
20
+ selectMany < TResult > ( item : ( item : T ) => Array < TResult > ) : IQueryable < TResult > ;
21
+ skip < TResult > ( count : Number ) : IQueryable < TResult > ;
22
+ take < TResult > ( count : Number ) : IQueryable < TResult > ;
23
+ single ( ) : T ;
24
+ single ( predicate : ( item : T ) => boolean ) : T ;
25
+ singleOrDefault ( ) : T ;
26
+ singleOrDefault ( predicate : ( item : T ) => boolean ) : T ;
27
+ first ( ) : T ;
28
+ last ( ) : T ;
29
+ max ( ) : T ;
30
+ distinct ( ) : IQueryable < T > ;
31
+ count ( ) : number ;
32
+ contains ( item : T ) : boolean ;
33
+ first ( predicate : ( item : T ) => boolean ) : T ;
34
+ firstOrDefault ( ) : T ;
35
+ each ( action : ( item : T ) => void ) : void ;
36
+ each < TKey > ( action : ( value : T , key : TKey ) => void ) : void ;
37
+ each ( action : ( item : T ) => void , a : boolean ) : void ;
38
+ toArray ( ) : Array < T > ;
39
+ concat ( second : Array < T > ) : IQueryable < T > ;
40
+ sum ( ) : T ;
41
+ distinct ( ) : IQueryable < T > ;
42
+ any ( ) : boolean ;
43
+ any ( predicate : ( item : T ) => boolean ) : boolean ;
44
+ all ( predicate : ( item : T ) => boolean ) : boolean ;
45
+ }
46
+ }
0 commit comments