@types/rascal 10.0.5 → 10.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. rascal/LICENSE +0 -0
  2. rascal/README.md +1 -1
  3. rascal/index.d.ts +106 -77
  4. rascal/package.json +3 -3
rascal/LICENSE CHANGED
File without changes
rascal/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for rascal (https://guidesmiths.github.io
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rascal.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 09 May 2022 20:31:35 GMT
11
+ * Last updated: Wed, 27 Sep 2023 07:12:04 GMT
12
12
  * Dependencies: [@types/amqplib](https://npmjs.com/package/@types/amqplib), [@types/node](https://npmjs.com/package/@types/node)
13
13
  * Global values: none
14
14
 
rascal/index.d.ts CHANGED
@@ -8,28 +8,30 @@
8
8
 
9
9
  /// <reference types="node" />
10
10
 
11
- import { EventEmitter } from 'events';
12
- import { Message, Options, Connection, Channel } from 'amqplib';
11
+ import { Channel, Connection, Message, Options } from "amqplib";
12
+ import { EventEmitter } from "events";
13
13
 
14
14
  export interface BindingConfig {
15
15
  source?: string | undefined;
16
16
  destination?: string | undefined;
17
- destinationType?: 'queue' | 'exchange' | undefined;
17
+ destinationType?: "queue" | "exchange" | undefined;
18
18
  bindingKey?: string | undefined;
19
19
  bindingKeys?: string[] | undefined;
20
20
  options?: any;
21
21
  }
22
22
 
23
23
  export interface QueueConfig {
24
+ name?: string | undefined;
24
25
  assert?: boolean | undefined;
25
26
  check?: boolean | undefined;
26
27
  options?: Options.AssertQueue | undefined;
27
28
  }
28
29
 
29
30
  export interface ExchangeConfig {
31
+ name?: string | undefined;
30
32
  assert?: boolean | undefined;
31
33
  check?: boolean | undefined;
32
- type?: 'direct' | 'fanout' | 'headers' | 'topic' | undefined;
34
+ type?: "direct" | "fanout" | "headers" | "topic" | undefined;
33
35
  options?: Options.AssertExchange | undefined;
34
36
  }
35
37
 
@@ -46,27 +48,31 @@ export interface ConnectionAttributes {
46
48
  query?: string | undefined;
47
49
  url?: string | undefined;
48
50
  loggableUrl?: string | undefined;
49
- options?: {
50
- heartbeat?: number | undefined;
51
- timeout?: number | undefined;
52
- channelMax?: number | undefined;
53
- connection_timeout?: number | undefined;
54
- [key: string]: any;
55
- } | undefined;
56
- socketOptions?: {
57
- timeout?: number | undefined;
58
- clientProperties?: {
59
- connection_name?: string | undefined;
60
- [key: string]: string | undefined;
51
+ options?:
52
+ | {
53
+ heartbeat?: number | undefined;
54
+ timeout?: number | undefined;
55
+ channelMax?: number | undefined;
56
+ connection_timeout?: number | undefined;
57
+ [key: string]: any;
61
58
  }
62
- } | undefined;
59
+ | undefined;
60
+ socketOptions?:
61
+ | {
62
+ timeout?: number | undefined;
63
+ clientProperties?: {
64
+ connection_name?: string | undefined;
65
+ [key: string]: string | undefined;
66
+ };
67
+ }
68
+ | undefined;
63
69
  }
64
70
 
65
71
  export interface RetryConfig {
66
72
  factor?: number | undefined;
67
73
  max?: number | undefined;
68
74
  min?: number | undefined;
69
- strategy?: 'exponential' | 'linear' | undefined;
75
+ strategy?: "exponential" | "linear" | undefined;
70
76
  delay?: number | undefined;
71
77
  }
72
78
 
@@ -88,34 +94,43 @@ export interface VhostConfig {
88
94
  check?: boolean | undefined;
89
95
  assert?: boolean | undefined;
90
96
  namespace?: string | boolean | undefined;
91
- publicationChannelPools?: {
92
- regularPool?: ChannelPoolConfig | undefined;
93
- confirmPool?: ChannelPoolConfig | undefined;
94
- } | undefined;
97
+ publicationChannelPools?:
98
+ | {
99
+ regularPool?: ChannelPoolConfig | undefined;
100
+ confirmPool?: ChannelPoolConfig | undefined;
101
+ }
102
+ | undefined;
95
103
  connection?: ConnectionConfig | undefined;
96
104
  connections?: ConnectionConfig[] | undefined;
97
- connectionStrategy?: 'random' | 'fixed' | undefined;
105
+ connectionStrategy?: "random" | "fixed" | undefined;
98
106
  exchanges?:
99
107
  | {
100
- [key: string]: ExchangeConfig;
101
- }
102
- | string[] | undefined;
108
+ [key: string]: ExchangeConfig;
109
+ }
110
+ | Array<string | ExchangeConfig>
111
+ | undefined;
103
112
  queues?:
104
113
  | {
105
- [key: string]: QueueConfig;
106
- }
107
- | string[] | undefined;
114
+ [key: string]: QueueConfig;
115
+ }
116
+ | Array<string | QueueConfig>
117
+ | undefined;
108
118
  bindings?:
109
119
  | {
110
- [key: string]: BindingConfig;
111
- }
112
- | string[] | undefined;
113
- publications?: {
114
- [key: string]: PublicationConfig;
115
- } | undefined;
116
- subscriptions?: {
117
- [key: string]: SubscriptionConfig;
118
- } | undefined;
120
+ [key: string]: BindingConfig;
121
+ }
122
+ | Array<string | BindingConfig>
123
+ | undefined;
124
+ publications?:
125
+ | {
126
+ [key: string]: PublicationConfig;
127
+ }
128
+ | undefined;
129
+ subscriptions?:
130
+ | {
131
+ [key: string]: SubscriptionConfig;
132
+ }
133
+ | undefined;
119
134
  }
120
135
 
121
136
  export interface PublicationConfig {
@@ -137,16 +152,18 @@ export interface Encryption {
137
152
  }
138
153
 
139
154
  export interface Redelivery {
140
- counters?: {
141
- [key: string]: {
142
- type: 'stub' | 'inMemory' | 'inMemoryCluster';
143
- size?: number | undefined;
144
- };
145
- } | undefined;
155
+ counters?:
156
+ | {
157
+ [key: string]: {
158
+ type: "stub" | "inMemory" | "inMemoryCluster";
159
+ size?: number | undefined;
160
+ };
161
+ }
162
+ | undefined;
146
163
  }
147
164
 
148
165
  export interface Recovery {
149
- strategy: 'ack' | 'nack' | 'republish' | 'forward';
166
+ strategy: "ack" | "nack" | "republish" | "forward";
150
167
  defer?: number | undefined;
151
168
  attempts?: number | undefined;
152
169
  requeue?: boolean | undefined;
@@ -169,31 +186,43 @@ export interface SubscriptionConfig {
169
186
  deferCloseChannel?: number | undefined;
170
187
  encryption?: string | undefined;
171
188
  autoCreated?: boolean | undefined;
172
- redeliveries?: {
173
- counter: string;
174
- limit: number;
175
- timeout?: number | undefined;
176
- } | undefined;
189
+ redeliveries?:
190
+ | {
191
+ counter: string;
192
+ limit: number;
193
+ timeout?: number | undefined;
194
+ }
195
+ | undefined;
177
196
  }
178
197
 
179
198
  interface BrokerConfig {
180
- vhosts?: {
181
- [key: string]: VhostConfig;
182
- } | undefined;
183
- publications?: {
184
- [key: string]: PublicationConfig;
185
- } | undefined;
186
- subscriptions?: {
187
- [key: string]: SubscriptionConfig;
188
- } | undefined;
199
+ vhosts?:
200
+ | {
201
+ [key: string]: VhostConfig;
202
+ }
203
+ | undefined;
204
+ publications?:
205
+ | {
206
+ [key: string]: PublicationConfig;
207
+ }
208
+ | undefined;
209
+ subscriptions?:
210
+ | {
211
+ [key: string]: SubscriptionConfig;
212
+ }
213
+ | undefined;
189
214
  redeliveries?: Redelivery | undefined;
190
- recovery?: {
191
- [key: string]: Recovery | Recovery[];
192
- } | undefined;
215
+ recovery?:
216
+ | {
217
+ [key: string]: Recovery | Recovery[];
218
+ }
219
+ | undefined;
193
220
  defaults?: VhostConfig | undefined;
194
- encryption?: {
195
- [key: string]: Encryption;
196
- } | undefined;
221
+ encryption?:
222
+ | {
223
+ [key: string]: Encryption;
224
+ }
225
+ | undefined;
197
226
  }
198
227
 
199
228
  declare const defaultConfig: {
@@ -416,10 +445,10 @@ export class SubscriberSessionAsPromised extends EventEmitter {
416
445
  name: string;
417
446
  cancel(): Promise<void>;
418
447
 
419
- on(event: 'message', listener: (message: Message, content: any, ackOrNackFn: AckOrNack) => void): this;
420
- on(event: 'error' | 'cancelled', listener: (err: Error) => void): this;
448
+ on(event: "message", listener: (message: Message, content: any, ackOrNackFn: AckOrNack) => void): this;
449
+ on(event: "error" | "cancelled", listener: (err: Error) => void): this;
421
450
  on(
422
- event: 'invalid_content' | 'redeliveries_exceeded' | 'redeliveries_error',
451
+ event: "invalid_content" | "redeliveries_exceeded" | "redeliveries_error",
423
452
  listener: (err: Error, message: Message, ackOrNackFn: AckOrNack) => void,
424
453
  ): this;
425
454
  }
@@ -445,10 +474,10 @@ export class SubscriptionSession extends EventEmitter {
445
474
  isCancelled(): boolean;
446
475
  cancel(next: ErrorCb): void;
447
476
 
448
- on(event: 'message', listener: (message: Message, content: any, ackOrNackFn: AckOrNack) => void): this;
449
- on(event: 'error' | 'cancelled', listener: (err: Error) => void): this;
477
+ on(event: "message", listener: (message: Message, content: any, ackOrNackFn: AckOrNack) => void): this;
478
+ on(event: "error" | "cancelled", listener: (err: Error) => void): this;
450
479
  on(
451
- event: 'invalid_content' | 'redeliveries_exceeded' | 'redeliveries_error',
480
+ event: "invalid_content" | "redeliveries_exceeded" | "redeliveries_error",
452
481
  listener: (err: Error, message: Message, ackOrNackFn: AckOrNack) => void,
453
482
  ): this;
454
483
  }
@@ -494,9 +523,9 @@ export class PublicationSession extends EventEmitter {
494
523
  isAborted(): boolean;
495
524
  emitPaused(): void;
496
525
 
497
- on(event: 'error', cb: (err: Error, messageId: string) => void): this;
498
- on(event: 'success', cb: (messageId: string) => void): this;
499
- on(event: 'return', cb: (message: Message) => void): this;
526
+ on(event: "error", cb: (err: Error, messageId: string) => void): this;
527
+ on(event: "success", cb: (messageId: string) => void): this;
528
+ on(event: "return", cb: (message: Message) => void): this;
500
529
  }
501
530
 
502
531
  export class Vhost extends EventEmitter {
@@ -538,15 +567,15 @@ declare namespace counters {
538
567
  }
539
568
 
540
569
  export {
570
+ AckOrNack,
541
571
  Broker,
542
572
  BrokerAsPromised,
573
+ BrokerConfig,
574
+ counters,
543
575
  createBroker,
544
576
  createBrokerAsPromised,
545
577
  defaultConfig,
546
578
  testConfig,
547
579
  withDefaultConfig,
548
580
  withTestConfig,
549
- counters,
550
- BrokerConfig,
551
- AckOrNack,
552
581
  };
rascal/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/rascal",
3
- "version": "10.0.5",
3
+ "version": "10.0.7",
4
4
  "description": "TypeScript definitions for rascal",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rascal",
6
6
  "license": "MIT",
@@ -33,6 +33,6 @@
33
33
  "@types/amqplib": "*",
34
34
  "@types/node": "*"
35
35
  },
36
- "typesPublisherContentHash": "cc399a217afe3f05970965ac19dccc5ae2a64c3fee00ecf479e7c1e9fec2c99b",
37
- "typeScriptVersion": "3.9"
36
+ "typesPublisherContentHash": "f5b8bb75b41943a942c7c349af570a57bf61748dc121efa751289a78ed4950ea",
37
+ "typeScriptVersion": "4.5"
38
38
  }