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:
parent
3c032dd5b9
commit
76181385d2
|
@ -291,8 +291,10 @@ export abstract class Connection<Channel extends AnyOf<Channels> = any> extends
|
||||||
|
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
|
if (name !== undefined) {
|
||||||
this.name = name;
|
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 {
|
||||||
this.stream.send('ch', {
|
this.stream.send('ch', {
|
||||||
|
|
|
@ -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"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue