Skip to content

Commit

Permalink
Attempt to fix TS errors in client code
Browse files Browse the repository at this point in the history
    ERROR in (..)/node_modules/@prezly/slate-editor/build/components/FloatingMenu/index.d.ts(1,25):
    TS2307: Cannot find module './FloatingMenu' or its corresponding type declarations.
    ERROR in (..)/node_modules/@prezly/slate-editor/build/components/LoadingPlaceholderV2/index.d.ts(1,25):
    TS2307: Cannot find module './LoadingPlaceholderV2' or its corresponding type declarations.

See: microsoft/TypeScript#35822
  • Loading branch information
kamilmielnik committed Mar 19, 2021
1 parent 553d67b commit 5375491
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { ButtonHTMLAttributes, FunctionComponent } from 'react';

interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
export interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
active?: boolean;
variant?: 'default' | 'danger';
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { FunctionComponent } from 'react';

interface Props {
export interface Props {
flex?: boolean;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Dropdown as BootstrapDropdown, DropdownProps, MenuItem } from 'react-bo
import './Dropdown.scss';
import { Option } from './types';

interface Props<Value extends string> extends Omit<DropdownProps, 'onChange'> {
export interface Props<Value extends string> extends Omit<DropdownProps, 'onChange'> {
onChange: (value: Value) => void;
options: Option<Value>[];
richTextFormattingOptions?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Link from './Link';
import SpaLink from './SpaLink';
import Toolbar from './Toolbar';

interface Props {
export interface Props {
className?: string;
containerRef: RefObject<HTMLElement>;
element: HTMLElement;
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-editor/src/components/FloatingMenu/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { FunctionComponent } from 'react';

import SvgIcon from '../SvgIcon';

interface Props {
export interface Props {
className?: string;
icon: BrowserSpriteSymbol;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-editor/src/components/FloatingMenu/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { AnchorHTMLAttributes, FunctionComponent } from 'react';

interface Props extends AnchorHTMLAttributes<HTMLAnchorElement> {
export interface Props extends AnchorHTMLAttributes<HTMLAnchorElement> {
className?: string;
disabled?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import classNames from 'classnames';
import React, { FunctionComponent } from 'react';
import { Link, LinkProps } from 'react-router-dom';

interface Props extends Partial<LinkProps> {
export interface Props extends Partial<LinkProps> {
className?: string;
disabled?: boolean;
href: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import classNames from 'classnames';
import React, { FunctionComponent } from 'react';

interface Props {
export interface Props {
className?: string;
}

const Toolbar: FunctionComponent<Props> = ({ children, className }) => (
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div
Expand All @@ -13,4 +14,5 @@ const Toolbar: FunctionComponent<Props> = ({ children, className }) => (
{children}
</div>
);

export default Toolbar;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { FunctionComponent } from 'react';

interface Props {
export interface Props {
children: string;
className?: string;
percent: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { FunctionComponent } from 'react';

import SvgIcon from '../SvgIcon';

interface Props {
export interface Props {
className?: string;
icon: BrowserSpriteSymbol;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useExtrapolatedProgress } from './lib';
import './LoadingPlaceholderV2.scss';
import ProgressBar from './ProgressBar';

interface Props extends HTMLAttributes<HTMLDivElement> {
export interface Props extends HTMLAttributes<HTMLDivElement> {
children: (props: { percent: string }) => ReactNode;
className?: string;
estimatedDuration: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { FunctionComponent } from 'react';

interface Props {
export interface Props {
className?: string;
percent: string;
}
Expand Down

0 comments on commit 5375491

Please sign in to comment.