Untitled Event Framework
raw JSON → 0.1.0-beta verified Sat Apr 25 auth: no javascript
A work-in-progress event framework library (v0.1.0-beta, pre-1.0). Currently experimental with no stable release cadence. Differentiators unknown due to early stage. Lacks documentation and examples. Likely not suitable for production use.
Common errors
error SyntaxError: Cannot use import statement outside a module ↓
cause Attempting to require() ESM-only package in a CommonJS script.
fix
Use import syntax or set type: module in package.json and rename file to .mjs.
error TypeError: event_framework_1.EventFramework is not a constructor ↓
cause Incorrectly using default import (import EventFramework from 'event-framework') instead of named import.
fix
Use import { EventFramework } from 'event-framework'.
error Module not found: Can't resolve 'event-framework' ↓
cause Package not installed or missing from package.json dependencies.
fix
Run npm install event-framework@0.1.0-beta.
Warnings
gotcha The package is in pre-release beta (v0.1.0-beta). APIs are unstable and may change without notice. ↓
fix Pin to exact version and test thoroughly before upgrading.
breaking All exports are ESM-only. No CommonJS or UMD build is provided. ↓
fix Use a bundler that supports ESM or set type: module in package.json.
deprecated The default export may be deprecated in future versions in favor of named exports. ↓
fix Always use named imports, e.g., import { EventFramework }.
gotcha The library is marked as WIP and contains no examples or tests. API behavior is undocumented. ↓
fix Review source code directly or wait for stable release.
Install
npm install event-framework yarn add event-framework pnpm add event-framework Imports
- EventFramework wrong
const EventFramework = require('event-framework')correctimport { EventFramework } from 'event-framework' - EventEmitter wrong
import EventEmitter from 'event-framework'correctimport { EventEmitter } from 'event-framework' - Event wrong
import { EventManager } from 'event-framework'correctimport { Event } from 'event-framework'
Quickstart
import { EventFramework } from 'event-framework';
const app = new EventFramework();
app.on('ready', () => console.log('ready'));
app.start();