Skip to content

Commit 23da279

Browse files
authoredApr 29, 2020
feat: Tweak server type definitions (cube-js#623) Thanks to @willhausman!
1 parent 99c4c6e commit 23da279

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
 

‎packages/cubejs-server-core/core/index.d.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ declare module "@cubejs-backend/server-core" {
3939
}
4040

4141
export interface OrchestratorOptions {
42-
redisPrefix: string;
43-
queryCacheOptions: QueryCacheOptions;
44-
preAggregationsOptions: PreAggregationsOptions;
42+
redisPrefix?: string;
43+
queryCacheOptions?: QueryCacheOptions;
44+
preAggregationsOptions?: PreAggregationsOptions;
4545
}
4646

4747
export interface QueryCacheOptions {
48-
refreshKeyRenewalThreshold: number;
49-
backgroundRenew: boolean;
50-
queueOptions: QueueOptions;
48+
refreshKeyRenewalThreshold?: number;
49+
backgroundRenew?: boolean;
50+
queueOptions?: QueueOptions;
5151
}
5252

5353
export interface PreAggregationsOptions {
54-
queueOptions: QueueOptions;
54+
queueOptions?: QueueOptions;
5555
}
5656

5757
export interface QueueOptions {
58-
concurrency: number;
59-
continueWaitTimeout: number;
60-
executionTimeout: number;
61-
orphanedTimeout: number;
62-
heartBeatInterval: number;
58+
concurrency?: number;
59+
continueWaitTimeout?: number;
60+
executionTimeout?: number;
61+
orphanedTimeout?: number;
62+
heartBeatInterval?: number;
6363
}
6464

6565
export interface RequestContext {

‎packages/cubejs-server/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface CreateOptions extends CoreCreateOptions {
1010
declare class CubejsServer {
1111
constructor(options: CreateOptions);
1212

13-
listen(): Promise<{ server: http.Server | https.Server, port: number, tlsPort?: number, app: express.Application }>;
13+
listen(options?: https.ServerOptions | http.ServerOptions): Promise<{ server: http.Server | https.Server, port: number, tlsPort?: number, app: express.Application }>;
1414
close(): Promise<void>;
1515
testConnections(): Promise<void>;
1616
}

0 commit comments

Comments
 (0)
Please sign in to comment.