Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gi.d.ts index file #173

Open
vixalien opened this issue Jun 18, 2024 · 4 comments
Open

Add gi.d.ts index file #173

vixalien opened this issue Jun 18, 2024 · 4 comments

Comments

@vixalien
Copy link

Hi. Thanks for working on this!

I see there's now an option to generate an index tsconfig.json. Would it also be possible to generate a gi.d.ts file similar to https://gitlab.gnome.org/BrainBlasted/gi-typescript-definitions/-/blob/nightly/gi.d.ts?ref_type=heads where we can import just one file and have all the types available

@JumpLink
Copy link
Collaborator

@vixalien Good idea. Would this also solve #168 for you? Maybe a part of it?

@vixalien
Copy link
Author

Most definitely. In fact the project almost meets the requirements.

I can theoretically do this manually by concatenating the -ambient.d.ts into a gi.d.ts file and then deleting them as they won't be needed 😅 but an option would be highly appreciated.

I would also delete the -import.d.ts files as they would be unused.

@JumpLink
Copy link
Collaborator

@vixalien Is also now implemented with the latest version and is the default if package.json support is disabled. In addition to the gi.d.ts with all GIR types, an index.d.ts is now also generated. This means that in addition to all GIR types, all types including the GJS core types can be imported by a single file, now.

@vixalien
Copy link
Author

Wow, you're on a roll! I'll take a look ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants