Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
1.75k stars 94 forks source link

Typescript Types aren't being (correctly?) recognized #489

Open TheAyes opened 4 days ago

TheAyes commented 4 days ago

I'm trying to use Typescript since I'm most comfortable with that, but after an init the types are extremly weird and even throw warnings in javascript. Essentially the props throw this error with the example bar (with the date and time):

Argument type
{   exclusivity: string,   anchor: string[],   name: string,   monitor: number,   child: Label<unknown> }
is not assignable to parameter type any

This applies to other widgets aswell. Effectively saying `X is not assignable to

While this is just a static analysis error it's still very distracting. Building I haven't tried yet since... Even if it builds, what's the point if everything I do is shown as an error.

The command I used to init was ags --init --config ./config/ags/config.ts

tsconfig

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ES2022",
    "lib": [
      "ES2022"
    ],
    "allowJs": true,
    "checkJs": true,
    "strict": true,
    "noImplicitAny": false,
    "baseUrl": ".",
    "typeRoots": [
      "./types"
    ],
    "skipLibCheck": true
  }
}

image