feat: include luau types

This commit is contained in:
Erica Marigold 2024-03-29 23:27:41 +05:30
parent 1b4a703491
commit 42af7620d5
No known key found for this signature in database
GPG key ID: 2768CC0C23D245D1
2 changed files with 18 additions and 1 deletions

View file

@ -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
View 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,
}