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

improve dynamic reexporting #5452

Merged
merged 7 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ function dynamicExport(module: Module, object: Record<string, any>) {
) {
return Reflect.get(target, prop);
}
for (const obj of reexportedObjects) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't think you'd need this with reexportedObjects being clearly set to a defined value above.

for (const obj of reexportedObjects!) {
const value = Reflect.get(obj, prop);
if (value !== undefined) return value;
}
return undefined;
},
ownKeys(target) {
const keys = Reflect.ownKeys(target);
for (const obj of reexportedObjects) {
for (const obj of reexportedObjects!) {
for (const key of Reflect.ownKeys(obj)) {
if (key !== "default" && !keys.includes(key)) keys.push(key);
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading