-
Notifications
You must be signed in to change notification settings - Fork 107
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
Direct usage of Module Augmentation with @lightningjs/core #480
Comments
Thanks for bringing this up @itsjamie. Just for anyone else who might stumble upon this, this problem only exists if you use I've got a workaround for this that should've been documented (better yet if we can export lightning-reexport.ts import Lightning from '@lightningjs/core';
export { Lightning }; augmentations.d.ts import './lightning-reexport'
declare module './lightning-reexport' {
/**
* Lightning Core Augmentations
*/
namespace Lightning {
namespace Component {
// ...
}
// ...
}
//...
} The nice thing with this is that you won't have to change the way you import Lightning Core in the rest of your application. TypeScript applies the augmentations to the actual source types irregardless as to how they are imported. |
We are going to add a named export along side the default export |
The original PR for this issue was reverted. It is now resolved as part of #498. |
Hey @frank-weindel, thanks for your comment and I am sorry about my confusion about this issue and #483. I have removed this from the July release as the fix (PR #498) has not been approved & merged yet. I hope we can include this one in the October release. |
It appears there is no way to augment the FireAncestors map with @lightningjs/core.
Because it exports
default
module augmentation is broken.See: https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
The text was updated successfully, but these errors were encountered: