declare JSON Map
This commit is contained in:
parent
d10f2f8664
commit
4e46f801f4
@ -1,6 +1,10 @@
|
|||||||
import {TagAccessor} from './tag';
|
import {TagAccessor} from './tag';
|
||||||
import {check_type} from './../util/type_check'
|
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{
|
export interface ContentContent{
|
||||||
title : string,
|
title : string,
|
||||||
@ -8,7 +12,7 @@ export interface ContentContent{
|
|||||||
basepath : string,
|
basepath : string,
|
||||||
filename : string,
|
filename : string,
|
||||||
hash? : string,
|
hash? : string,
|
||||||
additional : object,
|
additional : JSONMap,
|
||||||
tags : string[],//eager loading
|
tags : string[],//eager loading
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user