Fixing nullable warning

This commit is contained in:
K35 2022-01-11 08:47:35 +00:00
parent f90bd11508
commit d85ed22ea7
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@hibas123/jrpcgen",
"version": "1.0.21",
"version": "1.0.22",
"main": "lib/index.js",
"license": "MIT",
"packageManager": "yarn@3.1.1",

View File

@ -5,11 +5,11 @@ namespace __NAMESPACE__;
public delegate void NotifyPacket(string data);
public abstract class JRpcTransport {
public event NotifyPacket OnPacket;
public event NotifyPacket? OnPacket;
public abstract Task Write(string data);
// TODO: Spend some time finding a better permission, but it is fine for now
public void SendPacketEvent(string data) {
this.OnPacket.Invoke(data);
this.OnPacket?.Invoke(data);
}
}