All RR0 data types share common properties from their RR0Data interface.
Also, all RR0Data have other RR0Data types as properties, such as:
classDiagram
class RR0Data {
id: string
type: string
title: string
name: string
time: TimeContext
dirName: string
url?: string
}
RR0Data --> Place: place?
RR0Data --> People: people?
RR0Data --> RR0Data: events[]
class Sighting {
}
RR0Data <|-- Sighting
class People {
}
RR0Data <|-- People
class Organization {
}
RR0Data <|-- Organization
class Place {
}
RR0Data <|-- Place
class Case {
}
RR0Data <|-- Case
class Source {
}
RR0Data <|-- Source
class Investigation {
}
RR0Data <|-- Investigation
import { People, RR0Event } from "@rr0/data" works in a web application's bundle as in Node: the package's browser export
condition (which Vite, esbuild, webpack and Rollup's node-resolve pick for a browser build) resolves it to dist/browser.js, the model
alone (data, JSON, events, interviews, people, organizations, countries, sources), without the factories and services that read RR0's
files from disk. Only what the application uses ends up in its bundle. src/browser.test.ts keeps anything that needs Node out of it.