Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Rework plugin structure for autocompletion #2

Closed
Twixes opened this issue Jan 4, 2021 · 2 comments · Fixed by #4
Closed

Rework plugin structure for autocompletion #2

Twixes opened this issue Jan 4, 2021 · 2 comments · Fixed by #4

Comments

@Twixes
Copy link
Member

Twixes commented Jan 4, 2021

The current way of building plugins offers no autocompletion, even though it's based on TypeScript. That's because we're exporting relevant functions at the top level. Instead, a plugin should export default an object implementing interface Plugin – this would offer much better guidance to plugin builders.

@mariusandra
Copy link
Collaborator

I'm not sure I agree with this. The consensus between JS folks seems to be to move away from default (nameless) exports.

In addition, unless you build plugins with a TS/babel step, you can't use import/export at all. Thus this will not help people using the inline plugin editor.

Can't the same be achieved with some declarations.d.ts file?

@Twixes
Copy link
Member Author

Twixes commented Jan 5, 2021

Hm, will investigate how a declarations file would work (some time).

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

Successfully merging a pull request may close this issue.

2 participants