Skip to content

Commit 051051e

Browse files
chore(release): 4.1.1 [skip ci]
## [4.1.1](v4.1.0...v4.1.1) (2020-12-24) ### Bug Fixes * Fix TypeScript declaration inheritance ([#153](#153)) ([3e5b4f7](3e5b4f7))
1 parent 3e5b4f7 commit 051051e

4 files changed

Lines changed: 18 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
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

lib/types/UdpSocket.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
/// <reference types="node" />
1+
/**
2+
* @typedef {"ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"} BufferEncoding
3+
*/
24
export 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";
263266
import { Buffer } from "buffer";

lib/types/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
export default UdpSockets;
2+
export type Buffer = import("buffer").Buffer;
3+
/**
4+
* @typedef {import('buffer').Buffer} Buffer
5+
*/
26
declare class UdpSockets {
37
/**
48
* Creates a `UdpSockets.Socket` object. Once the socket is created, calling

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

0 commit comments

Comments
 (0)