Skip to content

Commit

Permalink
fix: lint (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
kerm1it authored Feb 2, 2021
1 parent a456b45 commit 5b659ce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/DrawerChild.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import getScrollBarSize from 'rc-util/lib/getScrollBarSize';
import KeyCode from 'rc-util/lib/KeyCode';
import omit from 'rc-util/lib/omit';

import { IDrawerChildProps } from './IDrawerPropTypes';
import type { IDrawerChildProps } from './IDrawerPropTypes';

import {
addEventListener,
Expand All @@ -18,9 +18,7 @@ import {
windowIsUndefined,
} from './utils';

const currentDrawer: {
[key: string]: boolean;
} = {};
const currentDrawer: Record<string, boolean> = {};

interface IState {
_self: DrawerChild;
Expand Down
2 changes: 1 addition & 1 deletion src/DrawerWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Portal from 'rc-util/lib/PortalWrapper';
import * as React from 'react';

import Child from './DrawerChild';
import { IDrawerProps, IDrawerChildProps } from './IDrawerPropTypes';
import type { IDrawerProps, IDrawerChildProps } from './IDrawerPropTypes';

interface IState {
open: boolean;
Expand Down
6 changes: 3 additions & 3 deletions src/IDrawerPropTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Project: https://github.com/react-component/drawer
// Definitions by: jljsj33 <https://github.com/jljsj33>
// Definitions: https://github.com/react-component/drawer
import { GetContainer } from 'rc-util/lib/PortalWrapper';
import * as React from 'react';
import ScrollLocker from 'rc-util/lib/Dom/scrollLocker';
import type { GetContainer } from 'rc-util/lib/PortalWrapper';
import type * as React from 'react';
import type ScrollLocker from 'rc-util/lib/Dom/scrollLocker';

export type IPlacement = 'left' | 'top' | 'right' | 'bottom';

Expand Down
4 changes: 1 addition & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ export function dataToArray(vars: any) {
}
return [vars];
}
const transitionEndObject: {
[key: string]: string;
} = {
const transitionEndObject: Record<string, string> = {
transition: 'transitionend',
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
Expand Down

1 comment on commit 5b659ce

@vercel
Copy link

@vercel vercel bot commented on 5b659ce Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.