mirror of
https://github.com/lune-org/lune.git
synced 2025-04-18 10:53:46 +01:00
fix(net, serde): update types to reflect buffer support
This commit is contained in:
parent
d1d7cb77e4
commit
77edb89829
2 changed files with 5 additions and 5 deletions
|
@ -61,7 +61,7 @@ export type FetchResponse = {
|
||||||
statusCode: number,
|
statusCode: number,
|
||||||
statusMessage: string,
|
statusMessage: string,
|
||||||
headers: HttpHeaderMap,
|
headers: HttpHeaderMap,
|
||||||
body: (string | buffer)?,
|
body: string?,
|
||||||
}
|
}
|
||||||
|
|
||||||
--[=[
|
--[=[
|
||||||
|
@ -83,7 +83,7 @@ export type ServeRequest = {
|
||||||
query: { [string]: string? },
|
query: { [string]: string? },
|
||||||
method: HttpMethod,
|
method: HttpMethod,
|
||||||
headers: { [string]: string },
|
headers: { [string]: string },
|
||||||
body: (string | buffer)?,
|
body: string?,
|
||||||
}
|
}
|
||||||
|
|
||||||
--[=[
|
--[=[
|
||||||
|
|
|
@ -70,7 +70,7 @@ end
|
||||||
@param encoded The string to decode
|
@param encoded The string to decode
|
||||||
@return The decoded lua value
|
@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
|
return nil :: any
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ end
|
||||||
@param s The string to compress
|
@param s The string to compress
|
||||||
@return The compressed string
|
@return The compressed string
|
||||||
]=]
|
]=]
|
||||||
function serde.compress(format: CompressDecompressFormat, s: string): string
|
function serde.compress(format: CompressDecompressFormat, s: buffer | string): string
|
||||||
return nil :: any
|
return nil :: any
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ end
|
||||||
@param s The string to decompress
|
@param s The string to decompress
|
||||||
@return The decompressed string
|
@return The decompressed string
|
||||||
]=]
|
]=]
|
||||||
function serde.decompress(format: CompressDecompressFormat, s: string): string
|
function serde.decompress(format: CompressDecompressFormat, s: buffer | string): string
|
||||||
return nil :: any
|
return nil :: any
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue