mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-18 09:00:13 +02:00
fix typescript AGAIN, fix icons, ignore pnpm lock
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -35,3 +35,6 @@ Thumbs.db
|
||||
dist/
|
||||
|
||||
research/
|
||||
|
||||
# PNPM lockfile
|
||||
pnpm-lock.yaml
|
||||
|
||||
5
globals.d.ts
vendored
Normal file
5
globals.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
SP_REACT: typeof React;
|
||||
}
|
||||
}
|
||||
@@ -12,5 +12,5 @@ import { IconsModule } from '../webpack';
|
||||
// }
|
||||
|
||||
export const Spinner = Object.values(IconsModule).find((mod: any) =>
|
||||
mod?.toString()?.includes("Spinner)}),a.createElement(\"path\",{d:\"M18 "),
|
||||
mod?.toString && /Spinner\)}\),.\.createElement\(\"path\",{d:\"M18 /.test(mod.toString())
|
||||
) as FC<{}>;
|
||||
@@ -58,14 +58,13 @@ export const CommonUIModule = allModules.find((m: Module) => {
|
||||
return false;
|
||||
});
|
||||
|
||||
export const IconsModule = allModules.find((m: Module) => {
|
||||
if (typeof m !== "object") return undefined;
|
||||
export const IconsModule = findModule((m: Module) => {
|
||||
if (typeof m !== "object") return false;
|
||||
for (let prop in m) {
|
||||
if (m[prop]?.toString()?.includes("Spinner)}),a.createElement(\"path\",{d:\"M18 ")) return true;
|
||||
if (m[prop]?.toString && /Spinner\)}\),.\.createElement\(\"path\",{d:\"M18 /.test(m[prop].toString())) return true;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
export const Router = findModuleChild((m: Module) => {
|
||||
if (typeof m !== "object") return undefined;
|
||||
for (let prop in m) {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"outDir": "dist",
|
||||
"module": "ESNext",
|
||||
"target": "ES2020",
|
||||
"jsx": "react-jsx",
|
||||
"jsx": "react",
|
||||
"jsxFactory": "SP_REACT.createElement",
|
||||
"declaration": true,
|
||||
"moduleResolution": "node",
|
||||
"noUnusedLocals": true,
|
||||
@@ -17,6 +18,6 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "globals.d.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user