refactor(misskey-js): enable exactOptionalPropertyTypes (#14203)

* refactor(misskey-js): enable exactOptionalPropertyTypes

* refactor(misskey-js): fix error where is appeared by enabling
This commit is contained in:
Kisaragi 2024-07-14 15:52:43 +09:00 committed by GitHub
parent 3c032dd5b9
commit 76181385d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -291,7 +291,9 @@ export abstract class Connection<Channel extends AnyOf<Channels> = any> extends
this.stream = stream; this.stream = stream;
this.channel = channel; 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 { public send<T extends keyof Channel['receives']>(type: T, body: Channel['receives'][T]): void {

View file

@ -15,6 +15,7 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"esModuleInterop": true, "esModuleInterop": true,
"exactOptionalPropertyTypes": true,
"typeRoots": [ "typeRoots": [
"./node_modules/@types" "./node_modules/@types"
], ],