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

Missing export keyword on destructured records #181

Closed
appsforartists opened this issue Dec 29, 2021 · 1 comment
Closed

Missing export keyword on destructured records #181

appsforartists opened this issue Dec 29, 2021 · 1 comment
Labels
Milestone

Comments

@appsforartists
Copy link

Bug report

Input code

export const queryDict: Record<string, string | boolean> = {
  param: '123',
  otherParam: '456',
};

export const {
  param,
  otherParam,
} = queryDict;

Expected output

// Generated by tsc v4.5.4

export declare const queryDict: Record<string, string | boolean>;
export declare const param: string | boolean, otherParam: string | boolean;

Actual output

// Generated by dts-bundle-generator v6.2.0

export declare const queryDict: Record<string, string | boolean>;
declare const param: string | boolean, otherParam: string | boolean;

export {};

Additional context
If the destructured export has only one key, dts correctly includes the export keyword before declare const. When more than one key is exported, dts forgets to export them.

@timocov timocov added the Bug label Jan 1, 2022
@timocov timocov added this to the 6.3 milestone Jan 1, 2022
@timocov timocov closed this as completed in 49a9b07 Jan 1, 2022
@timocov
Copy link
Owner

timocov commented Jan 1, 2022

Released in 6.3.0

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

No branches or pull requests

2 participants