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

Have addons implement their API at compile time #4847

Merged
merged 6 commits into from
Nov 2, 2023

Conversation

tisilent
Copy link
Contributor

fix #4828

  1. Missing clearTextureAtlas found in canvas addon
  2. xterm-addon-serialize , xterm-addon-unicode-graphemes may error TS2307: Cannot find module will happen and the reason cannot be found 💫

@tisilent
Copy link
Contributor Author

tisilent commented Oct 17, 2023

ok . All addons have been added.

edit:
But I don't know if this method is right or not. 😂

@tisilent
Copy link
Contributor Author

tisilent commented Nov 2, 2023

@Tyriar After you handle #4859, I will resubmit it.

@Tyriar
Copy link
Member

Tyriar commented Nov 2, 2023

I'm trying to fix the conflicts now

@Tyriar Tyriar added this to the 5.4.0 milestone Nov 2, 2023
@Tyriar Tyriar self-assigned this Nov 2, 2023
@Tyriar Tyriar changed the title add public api Have addons implement their API at c ompile timeadd public api Nov 2, 2023
@Tyriar Tyriar changed the title Have addons implement their API at c ompile timeadd public api Have addons implement their API at compile time Nov 2, 2023
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Just what I was after 🤌

@Tyriar Tyriar enabled auto-merge November 2, 2023 15:56
@Tyriar Tyriar merged commit e8da737 into xtermjs:master Nov 2, 2023
19 checks passed
@tisilent tisilent deleted the add-addon-public-api branch November 2, 2023 16:19
@jerch
Copy link
Member

jerch commented Nov 3, 2023

@tisilent Wow - thats a really interesting idea to solve the issue. ❤️

On a sidenote - that even solves another (non?) issue: its not possible anymore to accidentally import the addon into itself due to the path masking rule, whoever would have wanted that in the first place 😺

I still wonder - was there a specific reason to do it via a path rule, and not by directly importing the types from the d.ts files?

@tisilent
Copy link
Contributor Author

tisilent commented Nov 3, 2023

@jerch Without specifying path rules, TS compile may encounter problems. 😅

@tisilent
Copy link
Contributor Author

tisilent commented Nov 3, 2023

When the '. d. ts' file uses the import. declared module, it cannot be found during compilation. It is uncertain if there is anything else that needs to be configured.

@jerch
Copy link
Member

jerch commented Nov 3, 2023

Ah ok, glad you found a way around. I kinda never fully understood the declare module ideas/limitations - whenever I tried messing with it, it was a mess 😅.

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

Successfully merging this pull request may close these issues.

Can addons implement their own interfaces?
3 participants