refactor: remove unused function
This commit is contained in:
parent
516d7f5fbd
commit
f8e2930ec1
1 changed files with 0 additions and 23 deletions
|
@ -12,29 +12,6 @@ export type {
|
||||||
DBDocument
|
DBDocument
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MetaContentBody = {
|
|
||||||
title: "string",
|
|
||||||
content_type: "string",
|
|
||||||
basepath: "string",
|
|
||||||
filename: "string",
|
|
||||||
content_hash: "string",
|
|
||||||
additional: "object",
|
|
||||||
tags: "string[]",
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isDocBody = (c: unknown): c is DocumentBody => {
|
|
||||||
return check_type<DocumentBody>(c, MetaContentBody);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isDoc = (c: unknown): c is Document => {
|
|
||||||
if (typeof c !== "object" || c === null) return false;
|
|
||||||
if ("id" in c && typeof c.id === "number") {
|
|
||||||
const { id, ...rest } = c;
|
|
||||||
return isDocBody(rest);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface DocumentAccessor {
|
export interface DocumentAccessor {
|
||||||
/**
|
/**
|
||||||
* rescan document
|
* rescan document
|
||||||
|
|
Loading…
Add table
Reference in a new issue