Paperclip Interim Compiler
raw JSON → 18.3.8 verified Fri May 01 auth: no javascript
Interim compiler step for Paperclip, a visual programming language. Current stable version 18.3.8. Acts as an intermediate representation layer between Paperclip engines and output compilers like React. Bundles AST transformations and provides a uniform interface for compiler backends. Differentiates by being part of the Paperclip ecosystem, designed for multi-target code generation with a focus on UI components. Release cadence is tied to Paperclip monorepo releases, roughly monthly.
Common errors
error TypeError: InterimCompiler is not a constructor ↓
cause Using CommonJS require() in ESM-only package.
fix
Use import { InterimCompiler } from 'paperclip-interim' or ensure your module system is ESM.
error Cannot find module 'paperclip-interim' ↓
cause Package not installed or missing from dependencies.
fix
Run npm install paperclip-interim@18.3.8
Warnings
gotcha InterimCompiler constructor expects an engine instance; passing a string will throw silently. ↓
fix Ensure first argument is a compatible Paperclip engine object.
gotcha toString() method may produce undefined if not preprocessed; check engine state. ↓
fix Run engine's compile() before accessing InterimCompiler's output methods.
deprecated InterimCompiler.serialize() is deprecated in v18, use toString() instead. ↓
fix Replace serialize() calls with toString().
Install
npm install paperclip-interim yarn add paperclip-interim pnpm add paperclip-interim Imports
- InterimCompiler wrong
const { InterimCompiler } = require('paperclip-interim')correctimport { InterimCompiler } from 'paperclip-interim' - InterimCompiler (default) wrong
import { default } from 'paperclip-interim'correctimport InterimCompiler from 'paperclip-interim' - InterimNode wrong
import InterimNode from 'paperclip-interim'correctimport { InterimNode } from 'paperclip-interim'
Quickstart
import { InterimCompiler } from 'paperclip-interim';
import { existingEngine } from './engine'; // hypothetical
const compiler = new InterimCompiler(existingEngine);
console.log(compiler.toString()); // serialized IR