Skip to content

Commit

Permalink
refactor(misskey-js): enable exactOptionalPropertyTypes (#14203)
Browse files Browse the repository at this point in the history
* refactor(misskey-js): enable exactOptionalPropertyTypes

* refactor(misskey-js): fix error where is appeared by enabling
  • Loading branch information
KisaragiEffective authored Jul 14, 2024
1 parent 3c032dd commit 7618138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/misskey-js/src/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions packages/misskey-js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"experimentalDecorators": true,
"noImplicitReturns": true,
"esModuleInterop": true,
"exactOptionalPropertyTypes": true,
"typeRoots": [
"./node_modules/@types"
],
Expand Down

0 comments on commit 7618138

Please sign in to comment.