feat(ags): fix type checking with tsc
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
8157d3ef2d
commit
199fa9c32e
5 changed files with 9 additions and 12 deletions
|
@ -31,7 +31,6 @@ in {
|
|||
configPath,
|
||||
packages,
|
||||
pname,
|
||||
delete ? [],
|
||||
}: let
|
||||
girNameTable = {
|
||||
gtk4 = "Gtk-4.0";
|
||||
|
@ -57,7 +56,7 @@ in {
|
|||
force = true;
|
||||
source = pkgs.callPackage ./mk-types {
|
||||
inherit (self.inputs) ts-for-gir-src;
|
||||
inherit delete pname withGirNames;
|
||||
inherit pname withGirNames;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
withGirNames,
|
||||
buildNpmPackage,
|
||||
ts-for-gir-src,
|
||||
delete ? [],
|
||||
...
|
||||
}: let
|
||||
inherit (lib) concatMapStringsSep optionalString;
|
||||
inherit (lib) concatMapStringsSep;
|
||||
|
||||
buildPhase = ''
|
||||
npx @ts-for-gir/cli generate ${concatMapStringsSep " " (p: p.girName) withGirNames} \
|
||||
${concatMapStringsSep "\n" (p: "-g ${p.package.dev}/share/gir-1.0 \\") withGirNames}
|
||||
npx @ts-for-gir/cli generate \
|
||||
${concatMapStringsSep "\n" (p: " ${p.girName} \\") withGirNames}
|
||||
${concatMapStringsSep "\n" (p: " -g ${p.package.dev}/share/gir-1.0 \\") withGirNames}
|
||||
-g ${ts-for-gir-src}/girs \
|
||||
--ignoreVersionConflicts \
|
||||
-o ./types
|
||||
|
@ -32,9 +32,6 @@ in
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
${optionalString (delete != []) (
|
||||
"rm -f " + concatMapStringsSep " " (file: "./types/${file}.d.ts") delete
|
||||
)}
|
||||
cp -r ./types $out
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"module": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "ES2022"
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"module": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "ES2022"
|
||||
}
|
||||
|
|
|
@ -122,15 +122,14 @@ in {
|
|||
pname = "ags";
|
||||
configPath = "${cfg.configDir}/@girs";
|
||||
packages = filter (x:
|
||||
x.pname != "astal4" && x.pname != "libadwaita")
|
||||
x.pname != "libadwaita")
|
||||
cfg.astalLibs;
|
||||
delete = ["gdk-4.0" "gtk-4.0" "gsk-4.0"];
|
||||
})
|
||||
// (buildGirTypes {
|
||||
pname = "ags";
|
||||
configPath = "${gtk4ConfigDir}/@girs";
|
||||
packages = filter (x:
|
||||
x.pname != "astal3" && x.pname != "gtk-session-lock")
|
||||
x.pname != "gtk-session-lock")
|
||||
cfg.astalLibs;
|
||||
})
|
||||
// {
|
||||
|
|
Loading…
Reference in a new issue