rickvanlieshout.com/src/types/index.js

59 lines
961 B
JavaScript
Raw Normal View History

2019-08-01 04:05:23 +02:00
// @flow strict
2019-05-10 01:15:43 +02:00
import type { Node as ReactNode } from 'react';
2019-07-19 22:38:20 +02:00
export type RenderCallback = {
2019-08-01 04:05:23 +02:00
// $FlowFixMe
2019-07-19 22:38:20 +02:00
render: (data: any) => ReactNode;
}
2019-05-10 01:15:43 +02:00
2019-07-19 22:38:20 +02:00
export type Entry = {
getIn: (string[]) => string;
}
2019-05-10 01:15:43 +02:00
export type WidgetFor = (string) => string;
export type PageContext = {
tag: string,
category: string,
currentPage: number,
prevPagePath: string,
nextPagePath: string,
hasPrevPage: boolean,
hasNextPage: boolean
};
export type Node = {
fields: {
slug: string,
categorySlug?: string,
tagSlugs?: string[]
},
frontmatter: {
date: string,
description?: string,
category?: string,
tags?: string[],
title: string,
},
html: string,
id: string
};
export type Edge = {
node: Node
};
export type Edges = Array<Edge>;
export type AllMarkdownRemark = {
allMarkdownRemark: {
edges: Edges,
},
group: {
fieldValue: string,
totalCount: number
}[]
};
export type MarkdownRemark = Node;