Files
supabase/apps/docs/scripts/search/sources/base.ts
Charis 33b9e1ed29 chore(docs): convert all scripts to esm (#35996)
Scripts currently use CJS, which is causing a bit of a mess when trying
to use shared utilities from the app. Converting everything to ESM so
there are fewer conflicts when adding new scripts going forward.
2025-05-29 15:44:55 -04:00

29 lines
554 B
TypeScript

import type { Json, Section } from '../../helpers.mdx.js'
export abstract class BaseLoader {
type: string
constructor(
public source: string,
public path: string
) {}
abstract load(): Promise<BaseSource[]>
}
export abstract class BaseSource {
type: string
checksum?: string
meta?: Json
sections?: Section[]
constructor(
public source: string,
public path: string
) {}
abstract process(): { checksum: string; meta?: Json; ragIgnore?: boolean; sections: Section[] }
abstract extractIndexedContent(): string
}