Skip to content

handle default export in module augmentation #39

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

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

jamescdavis
Copy link
Member

@jamescdavis jamescdavis commented Jan 6, 2021

The Glint transform currently trips on a default export in a module augmentation included in a component class file, e.g. augmenting the component registry:

import Component from '@glimmer/component';

export default class FooComponent extends Component {}

declare module '@glint/environment-ember-loose/types/registry' {
  export default interface Registry {
    Foo: FooComponent;
  }
}

This adds a failing test for this and then adds handling of it by preventing traversal into declare module.

@dfreeman
Copy link
Member

dfreeman commented Jan 7, 2021

Nice catch—thanks for the fix! It looks like we've got some trouble with TS nightly right now; I'll see if I can't get that green so we can merge this

@dfreeman dfreeman added the bug Something isn't working label Jan 7, 2021
@dfreeman
Copy link
Member

dfreeman commented Jan 7, 2021

Ok, all fixed on master!

@jamescdavis jamescdavis force-pushed the handle_default_export_in_module_augmentation branch from 1af6499 to 4be9546 Compare January 7, 2021 13:43
@jamescdavis jamescdavis merged commit b44a003 into master Jan 7, 2021
@jamescdavis jamescdavis deleted the handle_default_export_in_module_augmentation branch January 7, 2021 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants