-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: update third party type definitions (#670)
* deps: update third party type definitions * fix: flow type errors
- Loading branch information
1 parent
c44ec71
commit 1e703f1
Showing
12 changed files
with
265 additions
and
1,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// @flow | ||
declare class Knex$SchemaBuilder extends Knex$QueryBuilder { | ||
hasTable(name: string): this; | ||
dropTable(name: string): this; | ||
createTable(name: string, fn: (table: Object) => void): this; | ||
} | ||
|
||
declare class Lux$Knex extends Knex$Knex { | ||
schema: Knex$SchemaBuilder; | ||
transaction((trx: Knex$Transaction) => any): Knex$QueryBuilder; | ||
} | ||
|
||
declare module 'knex' { | ||
declare type Error = { | ||
name: string, | ||
length: number, | ||
severity: string, | ||
code: string, | ||
detail: string, | ||
hint?: string, | ||
position?: any, | ||
intenralPosition?: any, | ||
internalQuery?: any, | ||
where?: any, | ||
schema: string, | ||
table: string, | ||
column?: any, | ||
dataType?: any, | ||
constraint?: string, | ||
file: string, | ||
line: string, | ||
routine: string, | ||
}; | ||
declare var exports: typeof Lux$Knex; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
flow-typed/npm/babel-plugin-transform-es2015-modules-commonjs_vx.x.x.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
// flow-typed signature: 70c5066abfa785637d22983bcc46f142 | ||
// flow-typed version: a3fdaed924/knex_v0.12.x/flow_>=v0.33.x | ||
|
||
declare class Knex$Transaction mixins Knex$QueryBuilder, events$EventEmitter, Promise { | ||
commit(connection?: any, value?: any): Promise<any>; | ||
rollback(): Promise<any>; | ||
savepoint(connection?: any): Promise<any>; | ||
} | ||
|
||
declare type Knex$QueryBuilderFn = (qb: Knex$QueryBuilder) => Knex$QueryBuilder; | ||
|
||
declare class Knex$QueryBuilder mixins Promise { | ||
select(key?: string[]): this; | ||
select(...key: string[]): this; | ||
timeout(ms: number, options?: { cancel: bool }): this; | ||
column(key: string[]): this; | ||
column(...key: string[]): this; | ||
with(alias: string, w: string|Knex$QueryBuilderFn): this; | ||
withSchema(schema: string): this; | ||
returning(column: string): this; | ||
returning(...columns: string[]): this; | ||
returning(columns: string[]): this; | ||
as(name: string): this; | ||
transacting(trx: ?Knex$Transaction): this; | ||
where(builder: Knex$QueryBuilderFn): this; | ||
where(column: string, value: any): this; | ||
where(column: string, operator: string, value: any): this; | ||
whereNot(builder: Knex$QueryBuilderFn): this; | ||
whereNot(column: string, value: any): this; | ||
whereNot(column: string, operator: string, value: any): this; | ||
whereIn(column: string, values: any[]): this; | ||
whereNotIn(column: string, values: any[]): this; | ||
whereNull(column: string): this; | ||
whereNotNull(column: string): this; | ||
whereExists(column: string): this; | ||
whereNotExists(column: string): this; | ||
whereBetween(column: string, range: number[]): this; | ||
whereNotBetween(column: string, range: number[]): this; | ||
whereRaw(raw: any): this; | ||
orWhere(builder: Knex$QueryBuilderFn): this; | ||
orWhere(column: string, value: any): this; | ||
orWhere(column: string, operator: string, value: any): this; | ||
orWhereNot(builder: Knex$QueryBuilderFn): this; | ||
orWhereNot(column: string, value: any): this; | ||
orWhereNot(column: string, operator: string, value: any): this; | ||
orWhereIn(column: string, values: any[]): this; | ||
orWhereNotIn(column: string, values: any[]): this; | ||
orWhereNull(column: string): this; | ||
orWhereNotNull(column: string): this; | ||
orWhereExists(column: string): this; | ||
orWhereNotExists(column: string): this; | ||
orWhereBetween(column: string, range: number[]): this; | ||
orWhereNotBetween(column: string, range: number[]): this; | ||
orWhereRaw(raw: any): this; | ||
innerJoin(table: string, c1: string, operator: string, c2: string): this; | ||
innerJoin(table: string, c1: string, c2: string): this; | ||
innerJoin(builder: Knex$QueryBuilder, c1?: string, c2?: string): this; | ||
leftJoin(table: string, c1: string, operator: string, c2: string): this; | ||
leftJoin(table: string, c1: string, c2: string): this; | ||
leftJoin(builder: Knex$QueryBuilder): this; | ||
leftOuterJoin(table: string, c1: string, operator: string, c2: string): this; | ||
leftOuterJoin(table: string, c1: string, c2: string): this; | ||
rightJoin(table: string, c1: string, operator: string, c2: string): this; | ||
rightJoin(table: string, c1: string, c2: string): this; | ||
rightOuterJoin(table: string, c1: string, operator: string, c2: string): this; | ||
rightOuterJoin(table: string, c1: string, c2: string): this; | ||
outerJoin(table: string, c1: string, operator: string, c2: string): this; | ||
outerJoin(table: string, c1: string, c2: string): this; | ||
fullOuterJoin(table: string, c1: string, operator: string, c2: string): this; | ||
fullOuterJoin(table: string, c1: string, c2: string): this; | ||
crossJoin(column: string, c1: string, c2: string): this; | ||
crossJoin(column: string, c1: string, operator: string, c2: string): this; | ||
joinRaw(sql: string, bindings?: mixed[]): this; | ||
distinct(): this; | ||
groupBy(column: string): this; | ||
groupByRaw(): this; | ||
orderBy(column: string, direction?: 'desc' | 'asc'): this; | ||
orderByRaw(): this; | ||
offset(offset: number): this; | ||
limit(limit: number): this; | ||
having(column: string, operator: string, value: mixed): this; | ||
union(): this; | ||
unionAll(): this; | ||
count(column?: string): this; | ||
countDistinct(column?: string): this; | ||
min(column?: string): this; | ||
max(column?: string): this; | ||
sum(column?: string): this; | ||
sumDistinct(column?: string): this; | ||
avg(column?: string): this; | ||
avgDistinct(column?: string): this; | ||
pluck(column: string): this; | ||
first(): this; | ||
from(table: string): this; | ||
from(builder: Knex$QueryBuilderFn|Knex$Knex|Knex$QueryBuilder): this; | ||
|
||
insert(): this; | ||
del(): this; | ||
delete(): this; | ||
update(): this; | ||
returning(columns: string[]): this; | ||
} | ||
|
||
declare class Knex$Knex mixins Knex$QueryBuilder, Promise { | ||
static (config: Knex$Config): Knex$Knex; | ||
static QueryBuilder: typeof Knex$QueryBuilder; | ||
$call: (tableName: string) => Knex$QueryBuilder; | ||
raw(sqlString: string): any; | ||
client: any; | ||
destroy(): Promise<void>; | ||
|
||
} | ||
|
||
declare type Knex$PostgresConfig = { | ||
client?: 'pg', | ||
connection?: { | ||
host?: string, | ||
user?: string, | ||
password?: string, | ||
database?: string, | ||
charset?: string, | ||
}, | ||
searchPath?: string, | ||
} | ||
declare type Knex$MysqlConfig = { | ||
client?: 'mysql', | ||
connection?: { | ||
host?: string, | ||
user?: string, | ||
password?: string, | ||
database?: string, | ||
}, | ||
} | ||
declare type Knex$SqliteConfig = { | ||
client?: 'sqlite3', | ||
connection?: { | ||
filename?: string, | ||
} | ||
} | ||
declare type Knex$Config = Knex$PostgresConfig | Knex$MysqlConfig | Knex$SqliteConfig; | ||
|
||
declare module 'knex' { | ||
declare type Error = { | ||
name: string, | ||
length: number, | ||
severity: string, | ||
code: string, | ||
detail: string, | ||
hint?: string, | ||
position?: any, | ||
intenralPosition?: any, | ||
internalQuery?: any, | ||
where?: any, | ||
schema: string, | ||
table: string, | ||
column?: any, | ||
dataType?: any, | ||
constraint?: string, | ||
file: string, | ||
line: string, | ||
routine: string, | ||
} | ||
declare var exports: typeof Knex$Knex; | ||
} |
Oops, something went wrong.