File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## [ 4.1.1] ( https://github.com/tradle/react-native-udp/compare/v4.1.0...v4.1.1 ) (2020-12-24)
2+
3+
4+ ### Bug Fixes
5+
6+ * Fix TypeScript declaration inheritance ([ #153 ] ( https://github.com/tradle/react-native-udp/issues/153 ) ) ([ 3e5b4f7] ( https://github.com/tradle/react-native-udp/commit/3e5b4f71d021f19d7720b7ccf05a343f93591d15 ) )
7+
18# [ 4.1.0] ( https://github.com/tradle/react-native-udp/compare/v4.0.4...v4.1.0 ) (2020-12-05)
29
310
Original file line number Diff line number Diff line change 1- /// <reference types="node" />
1+ /**
2+ * @typedef {"ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" } BufferEncoding
3+ */
24export default class UdpSocket extends EventEmitter {
35 /**
46 * @param {{ type: string; reusePort?: boolean; debug?: boolean; } } options
@@ -50,7 +52,7 @@ export default class UdpSocket extends EventEmitter {
5052 *
5153 * @param {(...args: any[]) => void } callback
5254 */
53- close ( callback ?: ( ...args : any [ ] ) => void ) : NodeJS . Immediate | undefined ;
55+ close ( callback ?: ( ...args : any [ ] ) => void ) : number | undefined ;
5456 /**
5557 * NOT IMPLEMENTED
5658 *
@@ -259,5 +261,6 @@ export default class UdpSocket extends EventEmitter {
259261 */
260262 remoteAddress ( ) : void ;
261263}
262- import { EventEmitter } from "node/events" ;
264+ export type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" ;
265+ import { EventEmitter } from "events" ;
263266import { Buffer } from "buffer" ;
Original file line number Diff line number Diff line change 11export default UdpSockets ;
2+ export type Buffer = import ( "buffer" ) . Buffer ;
3+ /**
4+ * @typedef {import('buffer').Buffer } Buffer
5+ */
26declare class UdpSockets {
37 /**
48 * Creates a `UdpSockets.Socket` object. Once the socket is created, calling
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-udp" ,
3- "version" : " 4.1.0 " ,
3+ "version" : " 4.1.1 " ,
44 "description" : " React Native UDP socket API for Android & iOS" ,
55 "homepage" : " https://github.com/tradle/react-native-udp" ,
66 "main" : " src/index.js" ,
You can’t perform that action at this time.
0 commit comments