type fixes

This commit is contained in:
Jason Miller 2021-06-06 16:59:34 -04:00
parent 3166e9deaa
commit f18fa3e2cb
2 changed files with 40 additions and 9 deletions

27
docs/global.d.ts vendored
View File

@ -1,13 +1,18 @@
interface ContentHeading {
heading: string;
}
interface ContentItem {
name: string;
nav?: string;
title?: string;
description?: string;
image?: string;
slug?: string;
[key: string]: string;
}
declare module 'content:*' {
interface Item {
name: string;
nav?: string;
title?: string;
description?: string;
image?: string;
[key: string]: string;
}
const Data: Item[];
const Data: Array<ContentItem | ContentHeading>;
export = Data;
}
@ -15,3 +20,7 @@ declare module 'markdown:*' {
const Url: string;
export = Url;
}
interface Window {
page: HTMLDivElement
}

22
docs/tsconfig.json Normal file
View File

@ -0,0 +1,22 @@
{
"compileOnSave": false,
"compilerOptions": {
"jsx": "preserve",
"jsxFactory": "preact.h",
"jsxFragmentFactory": "preact.Fragment",
"allowJs": true,
"checkJs": true,
// "strict": true,
"noEmit": true,
"moduleResolution": "node",
"target": "ESNext",
"module": "esnext",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"downlevelIteration": true
},
"include": ["node_modules/wmr/types.d.ts", "**/*"],
"typeAcquisition": {
"enable": true
}
}