TypeScript: Convert utils folder #12740
Labels
P2
Should do soon
Type: Code Quality
Things that need a refactor, rewrite or just some good old developer ❤️
Type: Enhancement
New feature or improvement of an existing feature
Feature Description
Most of the utility functions inside the
story-editor
package are isolated and only dependent on other already-converted packages. However, many providers inside thestory-editor
package depend on utilities and can't easily be converted unless their utilities are done so as well.There are a few exceptions to the above though:
contrastUtils
depend on the external library@ap.cx/hues
which does not appear to be typed or have types availablegetUpdatedSizeAndPosition
andpresetUtils
depend on un-converted functions inside theelement-library
packagestoryPageToCanvas
andstoryPageToDataUrl
depend onstoryPageToNode
, andstoryPageToNode
depends on thefont
provider and the canvas componentuseAddPreset
depends on thestory
provideruseApplyTextAutoStyle
depends on thepageCanvas
provider and the style panel componentuseCORSProxy
depends on theapi
provideruseElementPolygon
depends on thestory
andcanvas
providersuseElementWithLink
depends on thestory
andcanvas
providersuseIsUploadingToStory
depends on thestory
andlocalMedia
providersuseShapeMask
depends on thestory
andcanvas
providersuseShapeMaskElements
depends on thestory
providerThese functions should be moved to their respective providers (mostly to live inside the story provider) and or other relevant parts of the codebase, or their dependency types should be mocked.
The text was updated successfully, but these errors were encountered: