mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-25 12:38:57 +02:00
refactor: enforce type import specifiers (#6230)
* refactor: enforce type import specifiers * fix * Upgrade esbuild * Fix (haha)
This commit is contained in:
parent
24d65d9bdd
commit
cb1aa30286
192 changed files with 484 additions and 337 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
import path from 'path';
|
||||
import {cliDocsVersionCommand} from '../cli';
|
||||
import {PathOptions, SidebarOptions} from '../types';
|
||||
import type {PathOptions, SidebarOptions} from '../types';
|
||||
import fs from 'fs-extra';
|
||||
import {
|
||||
getVersionedDocsDirPath,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import {validateDocFrontMatter} from '../docFrontMatter';
|
||||
import {DocFrontMatter} from '../types';
|
||||
import type {DocFrontMatter} from '../types';
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
|
||||
function testField(params: {
|
||||
|
|
|
@ -27,7 +27,7 @@ import type {
|
|||
} from '../types';
|
||||
import type {LoadContext} from '@docusaurus/types';
|
||||
import {DEFAULT_OPTIONS} from '../options';
|
||||
import {Optional} from 'utility-types';
|
||||
import type {Optional} from 'utility-types';
|
||||
import {createSlugger, posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
import {createSidebarsUtils} from '../sidebars/utils';
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
DisabledNumberPrefixParser,
|
||||
} from '../numberPrefix';
|
||||
import {GlobExcludeDefault} from '@docusaurus/utils';
|
||||
import {PluginOptions} from '../types';
|
||||
import type {PluginOptions} from '../types';
|
||||
|
||||
// the type of remark/rehype plugins is function
|
||||
const markdownPluginsFunctionStub = () => {};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import {LoadedContent, DocMetadata, LoadedVersion} from '../types';
|
||||
import type {LoadedContent, DocMetadata, LoadedVersion} from '../types';
|
||||
import {CURRENT_VERSION_NAME} from '../constants';
|
||||
import {
|
||||
getLoadedContentTranslationFiles,
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
} from '../versions';
|
||||
import {DEFAULT_OPTIONS} from '../options';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
import {PluginOptions, VersionMetadata} from '../types';
|
||||
import type {PluginOptions, VersionMetadata} from '../types';
|
||||
import type {I18n} from '@docusaurus/types';
|
||||
|
||||
const DefaultI18N: I18n = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue