* Switch shared-components from yarn classic to pnpm Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch element-web from yarn classic to pnpm Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch CI to pnpm Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update docs & comments Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Hold back postcss to match yarn.lock & use workspace protocol Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Tweak CI Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Rid the world of `$(res)` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch to type=module Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix module import Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make knip happy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make docker build happy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove stale params Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix badly formatted logging Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch to lodash-es Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make jest happier Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch element-web to ESM Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update testcontainers imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix modernizr cjs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix modernizr cjs ignore files Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Move modernizr sonar exclusion to exclude everything Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright tests for esm compat Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add pnpm-link utility Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Test matrix-web-i18n Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Discard changes to src/vector/index.ts * Update playwright-common Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Use catalogs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve pnpm-link script Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Use pnpm import to regenerate lockfile from yarn.lock Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
47 lines
1.9 KiB
Diff
47 lines
1.9 KiB
Diff
diff --git a/types.d.ts b/types.d.ts
|
||
index 498bb694de2e6a62f14d3fe998dc538aff920fc6..ab288cdf8ca228fc8daaff2c5fb84ce665b40812 100644
|
||
--- a/types.d.ts
|
||
+++ b/types.d.ts
|
||
@@ -5,7 +5,7 @@
|
||
*/
|
||
// @ts-ignore JSX runtimes may optionally define JSX.ElementType. The MDX types need to work regardless whether this is
|
||
// defined or not.
|
||
-type ElementType = any extends JSX.ElementType ? never : JSX.ElementType;
|
||
+type ElementType = any extends React.JSX.ElementType ? never : React.JSX.ElementType;
|
||
|
||
/**
|
||
* This matches any function component types that ar part of `ElementType`.
|
||
@@ -20,12 +20,12 @@ type ClassElementType = Extract<ElementType, new(props: Record<string, any>) =>
|
||
/**
|
||
* A valid JSX string component.
|
||
*/
|
||
-type StringComponent = Extract<keyof JSX.IntrinsicElements, ElementType extends never ? string : ElementType>;
|
||
+type StringComponent = Extract<keyof React.JSX.IntrinsicElements, ElementType extends never ? string : ElementType>;
|
||
|
||
/**
|
||
* A JSX element returned by MDX content.
|
||
*/
|
||
-export type Element = JSX.Element;
|
||
+export type Element = React.JSX.Element;
|
||
|
||
/**
|
||
* A valid JSX function component.
|
||
@@ -44,7 +44,7 @@ type FunctionComponent<Props> = ElementType extends never
|
||
*/
|
||
type ClassComponent<Props> = ElementType extends never
|
||
// If JSX.ElementType isn’t defined, the valid return type is a constructor that returns JSX.ElementClass
|
||
- ? new(props: Props) => JSX.ElementClass
|
||
+ ? new(props: Props) => React.JSX.ElementClass
|
||
: ClassElementType extends never
|
||
// If JSX.ElementType is defined, but doesn’t allow constructors, function components are disallowed.
|
||
? never
|
||
@@ -70,7 +70,7 @@ interface NestedMDXComponents {
|
||
export type MDXComponents =
|
||
& NestedMDXComponents
|
||
& {
|
||
- [Key in StringComponent]?: Component<JSX.IntrinsicElements[Key]>;
|
||
+ [Key in StringComponent]?: Component<React.JSX.IntrinsicElements[Key]>;
|
||
}
|
||
& {
|
||
/**
|