feat: support for TypeScript v4.3
MODIFY
package.json
package.json
"mock-req": "^0.2.0",
"rimraf": "^3.0.1",
"ts-jest": "^26.3.0",
- "typescript": "^4.0.2"
+ "typescript": "^4.3.2"
},
"workspaces": [
"packages/*"

MODIFY
packages/@integration/package.json
packages/@integration/package.json
"@types/node": "^10.1.2",
"fp-ts": "^2.8.2",
"rxjs": "^6.6.2",
- "typescript": "^4.0.2"
+ "typescript": "^4.3.2"
},
"devDependencies": {
"concurrently": "^5.1.0",

MODIFY
packages/core/src/+internal/utils/any.util.ts
packages/core/src/+internal/utils/any.util.ts
@@ -20,9 +20,9 @@ export const getPortEnv = () => pipe(
O.toUndefined,
);
-export const wait = (seconds = 1) =>
+export const wait = (seconds = 1): Promise<unknown> =>
new Promise(res => {
- setTimeout(() => res(), seconds * 1000);
+ setTimeout(() => res(undefined), seconds * 1000);
});
export const bufferFrom = (data: any): Buffer =>

MODIFY
packages/core/src/+internal/utils/http.util.ts
packages/core/src/+internal/utils/http.util.ts
@@ -14,7 +14,7 @@ export const getHeaderValueHead = <T extends string = string>(key: string) => (r
export const closeServer = (server: HttpServer): Task<void> =>
() => new Promise((res, rej) =>
- server.close(err => err ? rej(err) : res()));
+ server.close(err => err ? rej(err) : res(undefined)));
export const getServerAddress = (server: HttpServer): { host: string; port: number } => {
const serverAddressInfo = server.address() as AddressInfo;

MODIFY
packages/messaging/src/transport/strategies/redis.strategy.helper.ts
packages/messaging/src/transport/strategies/redis.strategy.helper.ts
@@ -12,17 +12,17 @@ export const connectClient = async (options?: ClientOpts | undefined): Promise<R
export const quitClient = (client: RedisClient): Promise<undefined> =>
new Promise((resolve, reject) => {
- client.quit(error => error ? reject() : resolve());
+ client.quit(error => error ? reject() : resolve(undefined));
});
export const subscribeChannel = (client: RedisClient) => (channel: string): Promise<undefined> =>
new Promise((resolve, reject) => {
- client.subscribe(channel, error => error ? reject() : resolve());
+ client.subscribe(channel, error => error ? reject() : resolve(undefined));
});
export const unsubscribeChannel = (client: RedisClient) => (channel: string): Promise<undefined> =>
new Promise((resolve, reject) => {
- client.unsubscribe(channel, error => error ? reject() : resolve());
+ client.unsubscribe(channel, error => error ? reject() : resolve(undefined));
});
export const publishMessage = (client: RedisClient) => (channel: string) => (message: string): Promise<boolean> =>

MODIFY
packages/messaging/src/transport/transport.interface.ts
packages/messaging/src/transport/transport.interface.ts
@@ -64,6 +64,6 @@ export interface TransportMessage<T = Event> {
}
export const isTransportLayerConnection = <T extends Transport>(data: any): data is TransportLayerConnection<T> => {
- const conn = data as TransportLayerConnection;
+ const conn = data as Partial<TransportLayerConnection>;
return Boolean(conn.status$ && conn.emitMessage && conn.sendMessage);
}

MODIFY
packages/websockets/src/server/websocket.server.helper.ts
packages/websockets/src/server/websocket.server.helper.ts
@@ -19,7 +19,7 @@ export const createServer = (options: WebSocket.ServerOptions, eventTransformer:
}
export const sendMessage = (client: WebSocket) => (outgoingEvent: any): Promise<unknown> =>
- new Promise((res, rej) => client.send(outgoingEvent, err => err ? rej() : res()));
+ new Promise((res, rej) => client.send(outgoingEvent, err => err ? rej() : res(undefined)));
export const handleServerBrokenConnections = (server: WebSocketServerConnection, scheduler?: SchedulerLike) =>
interval(HEART_BEAT_INTERVAL, scheduler).pipe(

MODIFY
scripts/wait-redis.js
scripts/wait-redis.js
@@ -9,7 +9,7 @@ const log = msg => console.info(chalk.yellow(msg));
const wait = async () => {
log(' -- Waiting for Redis to be ready...');
const client = await redis.createClient();
- await new Promise((res, rej) => client.on('connect', err => err ? rej() : res()));
+ await new Promise((res, rej) => client.on('connect', err => err ? rej() : res(undefined)));
}
(async function() {

MODIFY
yarn.lock
yarn.lock
@@ -8445,10 +8445,10 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-typescript@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
- integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
+typescript@^4.3.2:
+ version "4.3.2"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
+ integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
uglify-js@^3.1.4:
version "3.13.5"

feat: support for TypeScript v4.3