mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib/types: flip maybeRaw
's merge function
`maybeRaw` should prioritise merging `rawLua` before the other type
This commit is contained in:
parent
cd76b4feb8
commit
7886be8760
2 changed files with 17 additions and 2 deletions
|
@ -32,7 +32,22 @@ rec {
|
|||
check = v: (isRawType v) || (v ? __empty);
|
||||
};
|
||||
|
||||
maybeRaw = type: types.either type rawLua;
|
||||
maybeRaw =
|
||||
elemType:
|
||||
let
|
||||
luaFirst = types.either rawLua elemType;
|
||||
elemFirst = types.either elemType rawLua;
|
||||
in
|
||||
luaFirst
|
||||
// {
|
||||
name = "maybeRaw";
|
||||
inherit (elemFirst) description;
|
||||
nestedTypes = {
|
||||
left = lib.warn "maybeRaw.nestedTypes: `left` is a deprecated alias for `elemType`." elemType;
|
||||
right = lib.warn "maybeRaw.nestedTypes: `right` is a deprecated alias for `rawLua`." rawLua;
|
||||
inherit rawLua elemType;
|
||||
};
|
||||
};
|
||||
|
||||
# Describes an boolean-like integer flag that is either 0 or 1
|
||||
# Has legacy support for boolean definitions, added 2024-09-08
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue