mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 01:47:21 +08:00
40 lines
781 B
TypeScript
40 lines
781 B
TypeScript
// Type definitions for Unist 1.0
|
|
// Project: https://github.com/syntax-tree/unist
|
|
// Definitions by: bizen241 <https://github.com/bizen241>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.4
|
|
|
|
export interface Node {
|
|
type: string;
|
|
data?: Data;
|
|
position?: Position;
|
|
}
|
|
|
|
export interface Data {
|
|
[key: string]: string | number | object | any[] | boolean | null;
|
|
}
|
|
|
|
export interface Position {
|
|
start: Point;
|
|
end: Point;
|
|
/** >= 1 */
|
|
indent?: number[];
|
|
}
|
|
|
|
export interface Point {
|
|
/** >= 1 */
|
|
line: number;
|
|
/** >= 1 */
|
|
column: number;
|
|
/** >= 0 */
|
|
offset?: number;
|
|
}
|
|
|
|
export interface Parent extends Node {
|
|
children: Node[];
|
|
}
|
|
|
|
export interface Text extends Node {
|
|
value: string;
|
|
}
|