@docusaurus/types
Advanced tools
Comparing version 2.0.0-alpha.36 to 2.0.0-alpha.37
{ | ||
"name": "@docusaurus/types", | ||
"version": "2.0.0-alpha.36", | ||
"version": "2.0.0-alpha.37", | ||
"description": "Common used typings for Docusaurus packages", | ||
@@ -12,7 +12,7 @@ "main": "./src/index.js", | ||
"dependencies": { | ||
"@types/webpack": "^4.32.0", | ||
"@types/webpack": "^4.41.0", | ||
"commander": "^4.0.1", | ||
"querystring": "0.2.0" | ||
}, | ||
"gitHead": "c413cff212196c440420ef7f3cac9856b766c5a3" | ||
"gitHead": "464d8e529a8a49be02f59ecc600cd5de3d1ef40f" | ||
} |
@@ -0,3 +1,10 @@ | ||
/** | ||
* Copyright (c) 2017-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import {Loader, Configuration} from 'webpack'; | ||
import {CommanderStatic} from 'commander'; | ||
import {Command} from 'commander'; | ||
import {ParsedUrlQueryInput} from 'querystring'; | ||
@@ -69,3 +76,11 @@ | ||
export interface Props extends LoadContext { | ||
export interface InjectedHtmlTags { | ||
headTags: string; | ||
preBodyTags: string; | ||
postBodyTags: string; | ||
} | ||
export type HtmlTags = string | HtmlTagObject | (string | HtmlTagObject)[]; | ||
export interface Props extends LoadContext, InjectedHtmlTags { | ||
routesPaths: string[]; | ||
@@ -77,3 +92,3 @@ plugins: Plugin<any>[]; | ||
addRoute(config: RouteConfig): void; | ||
createData(name: string, data: Object): Promise<string>; | ||
createData(name: string, data: any): Promise<string>; | ||
} | ||
@@ -101,3 +116,8 @@ | ||
getClientModules?(): string[]; | ||
extendCli?(cli: CommanderStatic): void; | ||
extendCli?(cli: Command): void; | ||
injectHtmlTags?(): { | ||
headTags?: HtmlTags; | ||
preBodyTags?: HtmlTags; | ||
postBodyTags?: HtmlTags; | ||
}; | ||
} | ||
@@ -124,2 +144,6 @@ | ||
export interface ChunkNames { | ||
[name: string]: string | null | ChunkNames | ChunkNames[]; | ||
} | ||
export interface RouteConfig { | ||
@@ -131,2 +155,3 @@ path: string; | ||
exact?: boolean; | ||
priority?: number; | ||
} | ||
@@ -148,1 +173,19 @@ | ||
} | ||
interface HtmlTagObject { | ||
/** | ||
* Attributes of the html tag | ||
* E.g. `{'disabled': true, 'value': 'demo', 'rel': 'preconnect'}` | ||
*/ | ||
attributes?: { | ||
[attributeName: string]: string | boolean; | ||
}; | ||
/** | ||
* The tag name e.g. `div`, `script`, `link`, `meta` | ||
*/ | ||
tagName: string; | ||
/** | ||
* The inner HTML | ||
*/ | ||
innerHTML?: string; | ||
} |
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
5447
166
Updated@types/webpack@^4.41.0