refactor: move exported type definitions to declaration file (#6300)

* refactor: move exported type definitions to declaration file

* fix

* fix
This commit is contained in:
Joshua Chen 2022-01-09 22:02:31 +08:00 committed by GitHub
parent 9c0e659a44
commit cf265c051e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 482 additions and 452 deletions

View file

@ -10,12 +10,10 @@ import path from 'path';
import readingTime from 'reading-time';
import {keyBy, mapValues} from 'lodash';
import type {
PluginOptions,
BlogPost,
BlogContentPaths,
BlogMarkdownLoaderOptions,
BlogTags,
ReadingTimeFunction,
} from './types';
import {
parseMarkdownFile,
@ -34,6 +32,10 @@ import type {LoadContext} from '@docusaurus/types';
import {validateBlogPostFrontMatter} from './blogFrontMatter';
import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
import logger from '@docusaurus/logger';
import type {
PluginOptions,
ReadingTimeFunction,
} from '@docusaurus/plugin-content-blog';
export function truncate(fileString: string, truncateMarker: RegExp): string {
return fileString.split(truncateMarker, 1).shift()!;