mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #10551 from yeiniel/master
Fixed return type for Client.stream() of cassandra-driver.
This commit is contained in:
+18
-18
@@ -16,10 +16,10 @@ declare module "cassandra-driver" {
|
||||
|
||||
namespace policies {
|
||||
namespace addressResolution {
|
||||
var EC2MultiRegionTranslator: EC2MultiRegionTranslatorStatic;
|
||||
var EC2MultiRegionTranslator: EC2MultiRegionTranslatorStatic;
|
||||
|
||||
interface AddressTranslator {
|
||||
translate(address: string, port: number, callback: Callback): void;
|
||||
translate(address: string, port: number, callback: Callback): void;
|
||||
}
|
||||
|
||||
interface EC2MultiRegionTranslatorStatic {
|
||||
@@ -141,7 +141,7 @@ declare module "cassandra-driver" {
|
||||
var Tuple: TupleStatic;
|
||||
var Uuid: UuidStatic;
|
||||
|
||||
enum consistencies {
|
||||
enum consistencies {
|
||||
any = 0,
|
||||
one,
|
||||
two,
|
||||
@@ -154,7 +154,7 @@ declare module "cassandra-driver" {
|
||||
localSerial,
|
||||
localOne
|
||||
}
|
||||
|
||||
|
||||
enum dataTypes {
|
||||
custom = 0,
|
||||
ascii,
|
||||
@@ -204,7 +204,7 @@ declare module "cassandra-driver" {
|
||||
fromString(value: string): BigDecimal;
|
||||
fromNumber(value: number): BigDecimal;
|
||||
}
|
||||
|
||||
|
||||
interface BigDecimal {
|
||||
equals(other: BigDecimal): boolean;
|
||||
inspect(): string;
|
||||
@@ -239,7 +239,7 @@ declare module "cassandra-driver" {
|
||||
|
||||
interface IntegerStatic {
|
||||
new(bits: Array<number>, sign: number): Integer;
|
||||
|
||||
|
||||
fromInt(value: number): Integer;
|
||||
fromNumber(value: number): Integer;
|
||||
fromBits(bits: Array<number>): Integer;
|
||||
@@ -295,7 +295,7 @@ declare module "cassandra-driver" {
|
||||
fromString(value: string): LocalDate;
|
||||
fromBuffer(buffer: Buffer): LocalDate;
|
||||
}
|
||||
|
||||
|
||||
interface LocalDate {
|
||||
_value: number;
|
||||
year: number;
|
||||
@@ -384,7 +384,7 @@ declare module "cassandra-driver" {
|
||||
|
||||
interface TimeUuidStatic {
|
||||
new (value?: Date, ticks?: number, nodeId?: string|Buffer, clockId?: string|Buffer): TimeUuid;
|
||||
|
||||
|
||||
fromDate(date: Date, ticks?: number, nodeId?: string|Buffer, clockId?: string|Buffer): TimeUuid;
|
||||
fromString(value: string): TimeUuid;
|
||||
min(date: Date, ticks?: number): TimeUuid;
|
||||
@@ -408,7 +408,7 @@ declare module "cassandra-driver" {
|
||||
interface Tuple {
|
||||
elements: Array<any>;
|
||||
length: number;
|
||||
|
||||
|
||||
get(index: number): any;
|
||||
toString(): string;
|
||||
toJSON(): string;
|
||||
@@ -513,7 +513,7 @@ declare module "cassandra-driver" {
|
||||
execute(query: string, params?: any, options?: QueryOptions, callback?: ResultCallback): void;
|
||||
getReplicas(keyspace: string, token: Buffer): Array<any>; // TODO: Should this be a more explicit return?
|
||||
shutdown(callback?: Callback): void;
|
||||
stream(query: string, params?: any, options?: QueryOptions, callback?: Callback): void;
|
||||
stream(query: string, params?: any, options?: QueryOptions, callback?: Callback): NodeJS.ReadableStream;
|
||||
}
|
||||
|
||||
interface HostStatic {
|
||||
@@ -549,7 +549,7 @@ declare module "cassandra-driver" {
|
||||
}
|
||||
|
||||
interface EncoderStatic {
|
||||
new(protocolVersion: number, options: ClientOptions) : Encoder;
|
||||
new(protocolVersion: number, options: ClientOptions) : Encoder;
|
||||
}
|
||||
|
||||
interface Encoder {
|
||||
@@ -590,29 +590,29 @@ declare module "cassandra-driver" {
|
||||
}
|
||||
|
||||
class ArgumentError extends DriverError {
|
||||
constructor(message: string);
|
||||
constructor(message: string);
|
||||
}
|
||||
|
||||
class AuthenticationError extends DriverError {
|
||||
constructor(message: string);
|
||||
constructor(message: string);
|
||||
}
|
||||
|
||||
class DriverInternalError extends DriverError {
|
||||
constructor(message: string);
|
||||
constructor(message: string);
|
||||
}
|
||||
|
||||
class NoHostAvailableError extends DriverError {
|
||||
constructor(innerErrors: any, message?: string);
|
||||
constructor(innerErrors: any, message?: string);
|
||||
}
|
||||
|
||||
class NotSupportedError extends DriverError {
|
||||
constructor(message: string);
|
||||
constructor(message: string);
|
||||
}
|
||||
|
||||
class OperationTimedOutError extends DriverError {}
|
||||
|
||||
class ResponseError extends DriverError {
|
||||
constructor(code: number, message: string);
|
||||
constructor(code: number, message: string);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ declare module "cassandra-driver" {
|
||||
|
||||
interface IndexStatic {
|
||||
new (name: string, target: string, kind: IndexType, options: Object): Index;
|
||||
|
||||
|
||||
fromRows(indexRows: Array<types.Row>): Array<Index>;
|
||||
fromColumnRows(columnRows: Array<types.Row>, columnsByName: { [key:string]: ColumnInfo }): Array<Index>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user