mirror of
https://github.com/preactjs/wmr.git
synced 2026-02-01 16:07:49 +00:00
type fixes
This commit is contained in:
parent
3166e9deaa
commit
f18fa3e2cb
27
docs/global.d.ts
vendored
27
docs/global.d.ts
vendored
@ -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
22
docs/tsconfig.json
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user