diff options
| author | Kisaragi <48310258+KisaragiEffective@users.noreply.github.com> | 2024-07-14 15:52:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-14 15:52:43 +0900 |
| commit | 76181385d2a8397c7df68c93f6ce9e5c293fc6b3 (patch) | |
| tree | 9347d3deafc6455afd8802657422862ac41c9406 | |
| parent | enhance: 非ログイン時には別サーバーに遷移できるように (... (diff) | |
| download | misskey-76181385d2a8397c7df68c93f6ce9e5c293fc6b3.tar.gz misskey-76181385d2a8397c7df68c93f6ce9e5c293fc6b3.tar.bz2 misskey-76181385d2a8397c7df68c93f6ce9e5c293fc6b3.zip | |
refactor(misskey-js): enable exactOptionalPropertyTypes (#14203)
* refactor(misskey-js): enable exactOptionalPropertyTypes
* refactor(misskey-js): fix error where is appeared by enabling
| -rw-r--r-- | packages/misskey-js/src/streaming.ts | 4 | ||||
| -rw-r--r-- | packages/misskey-js/tsconfig.json | 1 |
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" ], |