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

ace-builds: only exports the Types for MarkerGroup and does not export needed Types #5640

Open
Ryex opened this issue Sep 9, 2024 · 2 comments

Comments

@Ryex
Copy link

Ryex commented Sep 9, 2024

Describe the bug

ace-builds exports the interface for MarkerGroup in it's types file but does not contain or export the actual class definition. neither in its main ace.js nor any of the src* directories

https://github.com/search?q=repo%3Aajaxorg%2Face-builds%20Markergroup&type=code

Additionally the export Types contain no definition for MouseEvent, Tooltip, HoverTooltip nor PopupManager

Expected Behavior

const MarkerGroup = ace.require("ace/marker_group").MarkerGroup;

should succeed, especially after importing the esm or webpack resolver.

and types like

import ace from "ace-builds";
export import Ace = ace.Ace;
/*
Ace.MouseEvent
Ace.ToolTip
Ace.HoverTooltip
Ace.PopupManager
*/

should be exported.

Current Behavior

you need to redefine ace/marker_group with ace.define by copying code from kitchen_sink.js into your project

Reproduction Steps

put "ace-builds": "^1.36.0", in your package.json dependencies and try to import and use MarkerGroup

Possible Solution

No response

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

ace-builds: "^1.36.0"

@whazor
Copy link
Contributor

whazor commented Sep 20, 2024

Have you tried our other NPM package called ace-code? See some of the ACE samples related to ace-code on how to set it up. This way you can use direct imports.

@Ryex
Copy link
Author

Ryex commented Sep 21, 2024

I did, it was what I used initially. however it's arguably a worse experience with typescript because things like the toolltip module arn't declared and the types don't map.

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

No branches or pull requests

3 participants