You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to generate triple-slash compatible *.d.ts type declaration file for GrapesJS to work with a legacy application. The official index.d.ts file causes issues because the legacy app relies on namespaces rather than ES modules.
Current Setup
Using GrapesJS with a legacy application
Need to support triple-slash references and namespaces
What I've Tried
I attempted to use dts-bundle-generator (see my forked branch commit: e65eda4) but encountered multiple errors.
Required Format
The type declarations index.d.ts need to follow this pattern:
/// <reference types="jquery" />// import Backbone from 'backbone'; // import does not work since want to use triple-slash ref or namespacedeclarenamespaceBackbone{// Backbone type definitions}declarenamespacegrapesjs{interfaceComponentextendsBackbone.Model<ComponentModelProperties>{// component definitions}// other interfaces}Anyideaorhelphowtoachivethis?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
I need to generate triple-slash compatible
*.d.ts
type declaration file for GrapesJS to work with a legacy application. The officialindex.d.ts
file causes issues because the legacy app relies on namespaces rather than ES modules.Current Setup
What I've Tried
I attempted to use
dts-bundle-generator
(see my forked branch commit: e65eda4) but encountered multiple errors.Required Format
The type declarations
index.d.ts
need to follow this pattern:Beta Was this translation helpful? Give feedback.
All reactions