mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
refactor(v2): migrate core to Typescript ❄️🌀🐋 (#1494)
* refactor(v2): add typing for docusaurus/core * wip: last working * refactor(v2): add typing for @docusaurus/core * prettier * dont run in parallel otherwise some are uncompiled * nits * more typing * more typing * nits * type commands * nits
This commit is contained in:
parent
0568ad4992
commit
305e698e6e
74 changed files with 739 additions and 488 deletions
|
@ -102,7 +102,7 @@ export function genChunkName(
|
|||
prefix?: string,
|
||||
preferredName?: string,
|
||||
): string {
|
||||
let chunkName = chunkNameCache.get(modulePath);
|
||||
let chunkName: string | undefined = chunkNameCache.get(modulePath);
|
||||
if (!chunkName) {
|
||||
let str = modulePath;
|
||||
if (preferredName) {
|
||||
|
@ -146,10 +146,10 @@ export function parse(
|
|||
fileString: string,
|
||||
): {
|
||||
frontMatter: {
|
||||
[key: string]: any,
|
||||
},
|
||||
content: string,
|
||||
excerpt: string | undefined,
|
||||
[key: string]: any;
|
||||
};
|
||||
content: string;
|
||||
excerpt: string | undefined;
|
||||
} {
|
||||
const options: {} = {
|
||||
excerpt: (file: matter.GrayMatterFile<string>): void => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue