mirror of
https://github.com/0x5eal/wg-lua.git
synced 2024-12-12 04:40:36 +00:00
feat: include luau types
This commit is contained in:
parent
1b4a703491
commit
42af7620d5
2 changed files with 18 additions and 1 deletions
|
@ -60,7 +60,11 @@ function main()
|
|||
fs.writeFile(path, bundle)
|
||||
end
|
||||
|
||||
stdio.write(`\x1B[2K\rwrote {#ENTYRPOINTS} files in {os.clock() - fsStart}s`)
|
||||
stdio.write(`\x1B[2K\rwrote {#ENTYRPOINTS} files in {os.clock() - fsStart}s\n`)
|
||||
fs.copy("src/init.luau", "out/init.luau", {
|
||||
overwrite = true,
|
||||
})
|
||||
stdio.write("wrote luau types to out/init.luau!")
|
||||
end
|
||||
|
||||
return main()
|
||||
|
|
13
src/init.luau
Normal file
13
src/init.luau
Normal file
|
@ -0,0 +1,13 @@
|
|||
export type Keypair = {
|
||||
publicKey: string,
|
||||
privateKey: string,
|
||||
}
|
||||
|
||||
export type Wireguard = {
|
||||
generateKeypair: () -> Keypair,
|
||||
generatePrivateKey: (privateKey: { number }) -> string,
|
||||
}
|
||||
|
||||
return {
|
||||
wireguard = require("./init.lua") :: Wireguard,
|
||||
}
|
Loading…
Reference in a new issue