mirror of
https://github.com/0x5eal/wg-lua.git
synced 2025-04-19 03:03:47 +01: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)
|
fs.writeFile(path, bundle)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
return main()
|
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…
Add table
Reference in a new issue