Usage with Typescript
Orama is written in TypeScript and supports strong typing as a first-class feature.
Usage
You may want to types your variables. If needed, you can do it like this:
Enrich type of documents
Orama schema considers only the properties that are indexed. Anyway, the added documents can have other properties that are not indexed. The following example shows how to enrich the type of the documents.
Configuration
Set moduleResolution
in the compilerOptions
in your tsconfig.json
to be either Node16
or NodeNext
.
When importing types, always refer to the standard orama import: