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 = any> extends this.stream = stream; this.channel = channel; - this.name = name; + if (name !== undefined) { + this.name = name; + } } public send(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" ],