@docusaurus/module-type-aliases 0.0.0-4036 → 0.0.0-4041

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.d.ts +15 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/module-type-aliases",
3
- "version": "0.0.0-4036",
3
+ "version": "0.0.0-4041",
4
4
  "description": "Docusaurus module type aliases.",
5
5
  "types": "./src/index.d.ts",
6
6
  "publishConfig": {
@@ -19,5 +19,5 @@
19
19
  "@types/react-router-dom": "*"
20
20
  },
21
21
  "license": "MIT",
22
- "gitHead": "a1a3611b272bd9a9819fe92d4f978f3606ed1299"
22
+ "gitHead": "a2bc10cdc2953aace16d55f2f1cf15271a73c488"
23
23
  }
package/src/index.d.ts CHANGED
@@ -86,16 +86,21 @@ declare module '@docusaurus/Head' {
86
86
  }
87
87
 
88
88
  declare module '@docusaurus/Link' {
89
+ import type {CSSProperties, ComponentProps} from 'react';
90
+
89
91
  type NavLinkProps = Partial<import('react-router-dom').NavLinkProps>;
90
- export type LinkProps = NavLinkProps & {
91
- readonly isNavLink?: boolean;
92
- readonly to?: string;
93
- readonly href?: string;
94
- readonly autoAddBaseUrl?: boolean;
95
-
96
- // escape hatch in case broken links check is annoying for a specific link
97
- readonly 'data-noBrokenLinkCheck'?: boolean;
98
- };
92
+ export type LinkProps = NavLinkProps &
93
+ ComponentProps<'a'> & {
94
+ readonly className?: string;
95
+ readonly style?: CSSProperties;
96
+ readonly isNavLink?: boolean;
97
+ readonly to?: string;
98
+ readonly href?: string;
99
+ readonly autoAddBaseUrl?: boolean;
100
+
101
+ // escape hatch in case broken links check is annoying for a specific link
102
+ readonly 'data-noBrokenLinkCheck'?: boolean;
103
+ };
99
104
  const Link: (props: LinkProps) => JSX.Element;
100
105
  export default Link;
101
106
  }
@@ -110,7 +115,7 @@ declare module '@docusaurus/Interpolate' {
110
115
 
111
116
  export type InterpolateValues<
112
117
  Str extends string,
113
- Value extends ReactNode
118
+ Value extends ReactNode,
114
119
  > = Record<ExtractInterpolatePlaceholders<Str>, Value>;
115
120
 
116
121
  // TS function overload: if all the values are plain strings, then interpolate returns a simple string