Skip to content

Commit 0316654

Browse files
authored
chore(deps-dev): [email protected] (#1415)
- add several generic constrains per new ts generics behavior - disable lib check until socket.io is fixed socketio/socket.io#4459 - regenerate lock file
1 parent 60a1d71 commit 0316654

File tree

7 files changed

+18
-13
lines changed

7 files changed

+18
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"sinon": "^14.0.0",
7171
"sinon-chai": "^3.7.0",
7272
"source-map-loader": "^4.0.0",
73-
"typescript": "~4.7.4",
73+
"typescript": "~4.8.2",
7474
"util": "^0.12.4",
7575
"webpack": "^5.74.0"
7676
},

packages/core/src/com/communication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class Communication {
150150
/**
151151
* Creates a Proxy for a remote service api.
152152
*/
153-
public apiProxy<T>(
153+
public apiProxy<T extends object>(
154154
instanceToken: EnvironmentInstanceToken | Promise<EnvironmentInstanceToken>,
155155
{ id: api }: IDTag,
156156
serviceComConfig: ServiceComConfig<T> = {}

packages/core/src/com/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface EnvironmentRecord {
4242

4343
export type UnknownFunction = (...args: unknown[]) => unknown;
4444

45-
export type AsyncApi<T> = {
45+
export type AsyncApi<T extends object> = {
4646
[P in keyof T]: P extends keyof ServiceConfig<T>
4747
? MultiTanentProxyFunction<T, P extends string ? P : never>
4848
: T[P] extends (...args: any[]) => PromiseLike<any>

packages/core/src/entities/service.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import type { EnvVisibility } from '../types';
66
import { AllEnvironments, Environment, normEnvVisibility, Universal } from './env';
77
import { FeatureOutput } from './output';
88

9-
export type ServiceRuntime<T, ProvidedFrom> = ProvidedFrom extends Environment<string, EnvironmentTypes, 'single'>
9+
export type ServiceRuntime<T extends object, ProvidedFrom> = ProvidedFrom extends Environment<
10+
string,
11+
EnvironmentTypes,
12+
'single'
13+
>
1014
? AsyncApi<T>
1115
: ProvidedFrom extends Environment<string, EnvironmentTypes, 'multi', any>
1216
? {
@@ -15,13 +19,13 @@ export type ServiceRuntime<T, ProvidedFrom> = ProvidedFrom extends Environment<s
1519
: AsyncApi<T>;
1620

1721
export class Service<
18-
T,
22+
T extends object,
1923
PT,
2024
ProvidedFrom extends EnvVisibility,
2125
VisibleAt extends EnvVisibility,
2226
RemoteAccess extends boolean
2327
> extends FeatureOutput<T, PT, ProvidedFrom, VisibleAt, RemoteAccess> {
24-
public static withType<T>() {
28+
public static withType<T extends object>() {
2529
return {
2630
defineEntity<E_ENV extends EnvVisibility>(providedFrom: E_ENV) {
2731
return new Service<T, T, E_ENV, E_ENV, false>(providedFrom, providedFrom, false);

packages/engineer/src/cli-commands.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import fs from '@file-services/node';
1313
import { Application } from '@wixc3/engine-scripts';
1414
import { startDevServer } from './utils';
1515
import { parseCliArguments } from '@wixc3/engine-runtime-node';
16+
import type { ServerListeningHandler } from './feature/dev-server.feature';
1617

1718
const parseBoolean = (value: string) => value === 'true';
1819
const collectMultiple = (val: string, prev: string[]) => [...prev, val];
@@ -123,12 +124,12 @@ export const startCommand: CliCommand = (program) =>
123124
log,
124125
});
125126

126-
const { port } = await new Promise((resolve) => {
127+
const { port } = await new Promise((resolve: ServerListeningHandler) => {
127128
devServerFeature.serverListeningHandlerSlot.register(resolve);
128129
});
129130

130131
if (!process.send && featureName && configName && openBrowser === 'true') {
131-
await open(`http://localhost:${port as string}/main.html`);
132+
await open(`http://localhost:${port}/main.html`);
132133
}
133134
} catch (e) {
134135
printErrorAndExit(e);

tsconfig.base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
7171

7272
/* Advanced Options */
73-
// "skipLibCheck": true, /* Skip type checking of declaration files. */
73+
"skipLibCheck": true, /* Skip type checking of declaration files. */
7474
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
7575
}
7676
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7954,10 +7954,10 @@ typescript-type-utils@^0.1.0:
79547954
resolved "https://registry.yarnpkg.com/typescript-type-utils/-/typescript-type-utils-0.1.0.tgz#8ea40e5ceb41297184d36a2ef928932ad0f1e407"
79557955
integrity sha512-UXvYaUWfkUuTf287zYi+AE9pRkdHVcDHXk1N02a/ZmonLH2xpJL8EGzNozT/HNkAF+POlR6Lcx1wgg0ljMLcrw==
79567956

7957-
typescript@~4.7.4:
7958-
version "4.7.4"
7959-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
7960-
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
7957+
typescript@~4.8.2:
7958+
version "4.8.2"
7959+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
7960+
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==
79617961

79627962
uglify-js@^3.1.4:
79637963
version "3.17.0"

0 commit comments

Comments
 (0)