summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/misskey-js/src/streaming.ts4
-rw-r--r--packages/misskey-js/tsconfig.json1
2 files changed, 4 insertions, 1 deletions
diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts
index 0f26857782..83930e621c 100644
--- a/packages/misskey-js/src/streaming.ts
+++ b/packages/misskey-js/src/streaming.ts
@@ -291,7 +291,9 @@ export abstract class Connection<Channel extends AnyOf<Channels> = any> extends
this.stream = stream;
this.channel = channel;
- this.name = name;
+ if (name !== undefined) {
+ this.name = name;
+ }
}
public send<T extends keyof Channel['receives']>(type: T, body: Channel['receives'][T]): void {
diff --git a/packages/misskey-js/tsconfig.json b/packages/misskey-js/tsconfig.json
index 6e34e332e0..f7bbc47304 100644
--- a/packages/misskey-js/tsconfig.json
+++ b/packages/misskey-js/tsconfig.json
@@ -15,6 +15,7 @@
"experimentalDecorators": true,
"noImplicitReturns": true,
"esModuleInterop": true,
+ "exactOptionalPropertyTypes": true,
"typeRoots": [
"./node_modules/@types"
],