Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Export default namespace only in versionless-import#3

Open
vixalien wants to merge 1 commit into
gjsify:mainfrom
vixalien:export-default-namespace
Open

Export default namespace only in versionless-import#3
vixalien wants to merge 1 commit into
gjsify:mainfrom
vixalien:export-default-namespace

Conversation

@vixalien
Copy link
Copy Markdown

@vixalien vixalien commented Aug 8, 2023

When you try to do something like import Adw from 'gi://Adw' it fails, saying:

Module '"gi://Adw"' has no default export.ts(1192)

And this is because of this line in adw1.d.ts

declare module "gi://Adw" {
    export * from "gi://Adw?version=1";
}

which can be solved by rewriting it as following:

declare module "gi://Adw" {
// Notice `export { default }` instead of `export * `
    export { default } from "gi://Adw?version=1";
}

this PR combined with #2 closes #1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New version's types are broken

1 participant