ianharrigan / hxWebSockets

hxWebSockets - websockets for all haxe platforms
https://github.com/ianharrigan/hxWebSockets
81 stars 18 forks source link

[suggestion ]Please don't use dynamic type ! #17

Closed sonygod closed 4 years ago

sonygod commented 4 years ago

I just add this type to replayce Dynamic type inside webcommon.hx

     public var onmessage:MessageBuffType->Void;//line 23

package hx.ws;

import hx.ws.Buffer;

typedef MessageBuffType ={
    @:optional   var data:Buffer;
    var type:MsgTYpe;
@:optional var text:String;
} 

enum MsgTYpe {
text;
binary;
} 

@ianharrigan