declare JSON Map

This commit is contained in:
monoid 2021-01-06 20:17:15 +09:00
parent d10f2f8664
commit 4e46f801f4

View File

@ -1,6 +1,10 @@
import {TagAccessor} from './tag';
import {check_type} from './../util/type_check'
type JSONPrimitive = null|boolean|number|string;
interface JSONMap extends Record<string, JSONType>{}
interface JSONArray extends Array<JSONType>{};
type JSONType = JSONMap|JSONPrimitive|JSONArray;
export interface ContentContent{
title : string,
@ -8,7 +12,7 @@ export interface ContentContent{
basepath : string,
filename : string,
hash? : string,
additional : object,
additional : JSONMap,
tags : string[],//eager loading
}