Thank you for your interest in contributing. This guide will help you get started.
- Node.js >= 16
- npm >= 8
- Fork and clone the repository:
git clone https://github.com/Pexelize/pexelize-types.git
cd pexelize-editor-types- Install dependencies:
npm install- Build the package:
npm run buildpexelize-editor-types/
src/
index.ts # All type definitions (single-file source of truth)
dist/ # Build output (declarations + JS)
tsconfig.json # TypeScript configuration
This package is a types-only library. The entire public API is defined in src/index.ts — a single file containing 200+ exported types, interfaces, and enums covering the full Pexelize Editor SDK surface.
| Script | Description |
|---|---|
npm run build |
Compile TypeScript to dist/ (declarations + JS) |
npm run clean |
Remove the dist/ directory |
Changes to this package directly affect three framework wrappers:
@pexelize/react-email-editor— re-exports all types viaexport * from "@pexelize/editor-types"@pexelize/vue-email-editor— re-exports all types viaexport * from "@pexelize/editor-types"@pexelize/angular-email-editor— re-exports all types viaexport * from "@pexelize/editor-types"
After making changes here, rebuild the downstream packages to verify nothing breaks:
# In each wrapper package directory
npm run build
npm run typecheck- Create a new branch from
main:
git checkout -b feature/your-feature- Make your changes in
src/index.ts. Follow the existing organization — types are grouped by category with section headers:
// ============================================================================
// SECTION NAME
// ============================================================================- Verify your changes:
npm run build- If adding new types for a new SDK feature, add JSDoc comments explaining their purpose:
/**
* Description of what this type represents.
*
* @example
* ```typescript
* const config: MyNewConfig = { ... };
* ```
*/
export interface MyNewConfig {
/** Description of this property */
property: string;
}- Commit your changes with a clear, descriptive message:
git commit -m "feat: add types for custom widget API"Use Conventional Commits format:
feat:— new types for a new SDK featurefix:— correct an existing type definitiondocs:— documentation or JSDoc changesrefactor:— restructure types without changing the public APIchore:— maintenance tasks (deps, CI, build config)
- Adding types — add new types at the end of the relevant section with JSDoc comments.
- Modifying types — treat all exported types as public API. Adding optional properties is safe. Removing or renaming properties is a breaking change.
- Breaking changes — require a major version bump. Document the migration path in the commit message and PR description.
- JSDoc — all public interfaces and non-obvious type aliases should have JSDoc comments. Include
@exampleblocks where helpful.
- Push your branch to your fork.
- Open a pull request against the
mainbranch. - Provide a clear description of what types were added/changed and why.
- Make sure the CI checks pass (build).
- Use GitHub Issues to report type errors or request new type definitions.
- If a type doesn't match the actual SDK behavior, include the SDK method/property name and the expected vs. actual type.
- TypeScript strict mode is enabled.
- Use
interfacefor object shapes andtypefor unions, intersections, and aliases. - Group related types together under section headers.
- Use JSDoc comments for all public interfaces.
By contributing, you agree that your contributions will be licensed under the MIT License.