From 77edb89829183ecd28e2738535db07fd4fac5d8f Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sat, 20 Apr 2024 14:39:16 +0530 Subject: [PATCH] fix(net, serde): update types to reflect buffer support --- types/net.luau | 4 ++-- types/serde.luau | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/net.luau b/types/net.luau index 9cc5163..bb0a076 100644 --- a/types/net.luau +++ b/types/net.luau @@ -61,7 +61,7 @@ export type FetchResponse = { statusCode: number, statusMessage: string, headers: HttpHeaderMap, - body: (string | buffer)?, + body: string?, } --[=[ @@ -83,7 +83,7 @@ export type ServeRequest = { query: { [string]: string? }, method: HttpMethod, headers: { [string]: string }, - body: (string | buffer)?, + body: string?, } --[=[ diff --git a/types/serde.luau b/types/serde.luau index 6bd63db..c4a21d8 100644 --- a/types/serde.luau +++ b/types/serde.luau @@ -70,7 +70,7 @@ end @param encoded The string to decode @return The decoded lua value ]=] -function serde.decode(format: EncodeDecodeFormat, encoded: string): any +function serde.decode(format: EncodeDecodeFormat, encoded: buffer | string): any return nil :: any end @@ -93,7 +93,7 @@ end @param s The string to compress @return The compressed string ]=] -function serde.compress(format: CompressDecompressFormat, s: string): string +function serde.compress(format: CompressDecompressFormat, s: buffer | string): string return nil :: any end @@ -116,7 +116,7 @@ end @param s The string to decompress @return The decompressed string ]=] -function serde.decompress(format: CompressDecompressFormat, s: string): string +function serde.decompress(format: CompressDecompressFormat, s: buffer | string): string return nil :: any end