Formatting

This commit is contained in:
squidfunk 2022-12-11 15:56:47 +01:00
parent 24a3be8f04
commit 77528e7e64

View File

@ -26,19 +26,25 @@ import lunr from "lunr"
* Global types * Global types
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
type Fields = "text" | "title" | "tags"
declare global { declare global {
namespace lunr { namespace lunr {
/**
* Indexed fields
*/
type Fields = "text" | "title" | "tags"
/** /**
* Index - expose inverted index * Index - expose inverted index
*/ */
interface Index { // this is defined in the actual inverface... interface Index {
invertedIndex: Record<string, unknown> invertedIndex: Record<string, unknown>
fields: Fields[] fields: Fields[]
} }
/**
* Improve typings of query builder
*/
interface Builder { interface Builder {
field( field(
fieldName: string, fieldName: string,