Skip to main content

Decorators Overview

Oidis uses TypeScript decorators to define models, expose APIs, map routes, and compose classes. Each decorator has a dedicated reference page.

Pages in This Section​

DecoratorPurpose
@Entity & @PropertyMap TypeScript classes to MongoDB collections and define model fields with types, defaults, and validation
@ExternExpose backend methods as remotely callable LCP endpoints for frontend connectors
@RouteDefine REST API endpoints with typed parameters for HTTP access
@ResolverMap URL paths to controller classes for hash-based routing
@PartialTypeScript mixin pattern for composing classes from multiple sources at runtime

When to Use Which​

  • Building a data model? → @Entity + @Property
  • Frontend needs to call a backend method? → @Extern
  • External system needs an HTTP API? → @Route
  • Mapping a URL to a page/panel? → @Resolver
  • Splitting a large class across files or packages? → @Partial

See also: Models Overview | LCP & RPC | Routing