
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@templatical/types
Advanced tools
Shared TypeScript types, block factory functions, and event emitter for Templatical email editor
Shared TypeScript types, block factory functions, and type guards for the Templatical email editor.
Zero-dependency package containing all shared types for the Templatical email editor ecosystem. Block schemas, template config, factory helpers, and type guards.
Use this directly if you need to programmatically create or transform Templatical templates — for example, in a backend service, codegen pipeline, or migration script.
npm install @templatical/types
import {
createTitleBlock,
createParagraphBlock,
createButtonBlock,
isImage,
isSection,
} from '@templatical/types';
import type { TemplateContent, Block } from '@templatical/types';
// Build a template programmatically
const content: TemplateContent = {
blocks: [
createTitleBlock({ text: 'Welcome to Templatical', level: 1 }),
createParagraphBlock({ text: 'Build email templates visually.' }),
createButtonBlock({ text: 'Get started', href: 'https://templatical.com' }),
],
settings: { width: 600, backgroundColor: '#ffffff' },
};
// Type-narrow blocks safely
function describeBlock(block: Block): string {
if (isImage(block)) return `Image: ${block.src}`;
if (isSection(block)) return `Section with ${block.columns.length} columns`;
return block.type;
}
Block, TitleBlock, ParagraphBlock, ImageBlock, ButtonBlock, SectionBlock, DividerBlock, SpacerBlock, SocialIconsBlock, MenuBlock, TableBlock, HtmlBlock, VideoBlock, CountdownBlock, CustomBlockcreateTitleBlock(), createParagraphBlock(), etc. for every block typeisTitle(), isParagraph(), isImage(), isSection(), etc.Template, TemplateContent, TemplateSettingsThemeOverrides, UiTheme, BlockDefaults, FontsConfigMergeTagsConfig, DisplayConditionsConfig, CustomBlockDefinitionEventEmitter (used internally by core)Full reference at docs.templatical.com.
MIT
FAQs
Shared TypeScript types, block factory functions, and event emitter for Templatical email editor
The npm package @templatical/types receives a total of 2,341 weekly downloads. As such, @templatical/types popularity was classified as popular.
We found that @templatical/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.