@docusaurus/types
Advanced tools
Comparing version 0.0.0-6049 to 0.0.0-6051
{ | ||
"name": "@docusaurus/types", | ||
"version": "0.0.0-6049", | ||
"version": "0.0.0-6051", | ||
"description": "Common types for Docusaurus packages.", | ||
@@ -30,3 +30,3 @@ "types": "./src/index.d.ts", | ||
}, | ||
"gitHead": "f6855e0f81535a12a66babb934ad8dcf6e9361b2" | ||
"gitHead": "514aff8036dc6abbab4247c6a16bbcb3106c2854" | ||
} |
@@ -10,3 +10,3 @@ /** | ||
import type {RuleSetRule} from 'webpack'; | ||
import type {Required as RequireKeys, DeepPartial} from 'utility-types'; | ||
import type {DeepPartial, Overwrite} from 'utility-types'; | ||
import type {I18nConfig} from './i18n'; | ||
@@ -127,3 +127,9 @@ import type {PluginConfig, PresetConfig, HtmlTagObject} from './plugin'; | ||
export type FasterConfig = { | ||
swcJsLoader: boolean; | ||
}; | ||
export type FutureConfig = { | ||
experimental_faster: FasterConfig; | ||
experimental_storage: StorageConfig; | ||
@@ -421,2 +427,5 @@ | ||
*/ | ||
// TODO Docusaurus v4 | ||
// Use an object type ({isServer}) so that it conforms to jsLoaderFactory | ||
// Eventually deprecate this if swc loader becomes stable? | ||
jsLoader: 'babel' | ((isServer: boolean) => RuleSetRule); | ||
@@ -429,9 +438,19 @@ }; | ||
/** | ||
* Docusaurus config, as provided by the user (partial/unnormalized). This type | ||
* Docusaurus config, as provided by the user (partial/un-normalized). This type | ||
* is used to provide type-safety / IDE auto-complete on the config file. | ||
* @see https://docusaurus.io/docs/typescript-support | ||
*/ | ||
export type Config = RequireKeys< | ||
export type Config = Overwrite< | ||
DeepPartial<DocusaurusConfig>, | ||
'title' | 'url' | 'baseUrl' | ||
{ | ||
title: DocusaurusConfig['title']; | ||
url: DocusaurusConfig['url']; | ||
baseUrl: DocusaurusConfig['baseUrl']; | ||
future?: Overwrite< | ||
DeepPartial<FutureConfig>, | ||
{ | ||
experimental_faster?: boolean | FasterConfig; | ||
} | ||
>; | ||
} | ||
>; |
@@ -63,3 +63,5 @@ /** | ||
isServer: boolean; | ||
babelOptions?: {[key: string]: unknown}; | ||
// TODO Docusaurus v4 remove? | ||
// not ideal because JS Loader might not use Babel... | ||
babelOptions?: string | {[key: string]: unknown}; | ||
}) => RuleSetRule; | ||
@@ -126,4 +128,5 @@ }; | ||
) => Promise<void> | void; | ||
// TODO refactor the configureWebpack API surface: use an object instead of | ||
// multiple params (requires breaking change) | ||
// TODO Docusaurus v4 ? | ||
// refactor the configureWebpack API surface: use an object instead of | ||
// multiple params (requires breaking change) | ||
configureWebpack?: ( | ||
@@ -130,0 +133,0 @@ config: WebpackConfiguration, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38467
1110