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

Expose Glint types #494

Merged
merged 9 commits into from
May 31, 2022
Merged

Expose Glint types #494

merged 9 commits into from
May 31, 2022

Conversation

simonihmig
Copy link
Owner

@simonihmig simonihmig commented May 16, 2022

Update: after...

  • fixing duplicated glint dependencies
  • adding exports and typesVersions
  • upgrading rollup-plugin-ts to v3

... this now seems to work perfectly, both with

  • TS 4.6
  • TS 4.7 and node16 module resolutions

This is not quite ready yet, as I need to figure out how the consuming app can import the glint module.

The thing is that this v2 addon uses exports, but

  • only the upcoming TS 4.7 will support that
  • and that also hasn't really worked

Something like this worked in the IDE, but Glint was still not seeing the types added to the registry:

"exports": {
    "./glint": {
      "types": "./dist/glint.d.ts"
    },
    "./*": {
      "types": "./dist/*",
      "default": "./dist/*"
    },
    "./addon-main.js": "./addon-main.js"
  }

@simonihmig simonihmig marked this pull request as ready for review May 31, 2022 10:50
@simonihmig simonihmig added the enhancement New feature or request label May 31, 2022
@simonihmig simonihmig merged commit ee29633 into master May 31, 2022
@simonihmig simonihmig deleted the glint branch May 31, 2022 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant