diff options
| author | William Boman <william@redwill.se> | 2022-08-15 21:03:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-15 21:03:06 +0200 |
| commit | 3c62386a396ae0c1cd7adbaacc379eb4af072a65 (patch) | |
| tree | 4d00d20958839a04e6a996c11b97724c762e491a /lua/mason-core/receipt.lua | |
| parent | chore: update generated code (#295) (diff) | |
| download | mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.gz mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.bz2 mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.lz mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.xz mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.zst mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.zip | |
refactor: introduce selene, harden type defs, and use proper EmmyLua syntax (#296)
Diffstat (limited to 'lua/mason-core/receipt.lua')
| -rw-r--r-- | lua/mason-core/receipt.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/mason-core/receipt.lua b/lua/mason-core/receipt.lua index 76cd7449..4d346ed8 100644 --- a/lua/mason-core/receipt.lua +++ b/lua/mason-core/receipt.lua @@ -115,9 +115,14 @@ function InstallReceiptBuilder:build() } end +---@class InstallReceiptPackageSource +---@field type string +---@field package string + ---@param type InstallReceiptSourceType local function package_source(type) ---@param pkg string + ---@return InstallReceiptPackageSource return function(pkg) return { type = type, package = pkg } end @@ -156,7 +161,7 @@ function InstallReceiptBuilder.git_remote(remote_url) return { type = "git", remote = remote_url } end ----@class InstallReceipt +---@class InstallReceipt<T> : { primary_source: T } ---@field public name string ---@field public schema_version InstallReceiptSchemaVersion ---@field public metrics {start_time:integer, completion_time:integer} |
