ajaxorg / ace

Ace (Ajax.org Cloud9 Editor)
https://ace.c9.io
Other
26.77k stars 5.29k forks source link

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

Open Ryex opened 2 months ago

Ryex commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.