Skip to content

Commit 5b659ce

Browse files
authored
fix: lint (#165)
1 parent a456b45 commit 5b659ce

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

src/DrawerChild.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import getScrollBarSize from 'rc-util/lib/getScrollBarSize';
44
import KeyCode from 'rc-util/lib/KeyCode';
55
import omit from 'rc-util/lib/omit';
66

7-
import { IDrawerChildProps } from './IDrawerPropTypes';
7+
import type { IDrawerChildProps } from './IDrawerPropTypes';
88

99
import {
1010
addEventListener,
@@ -18,9 +18,7 @@ import {
1818
windowIsUndefined,
1919
} from './utils';
2020

21-
const currentDrawer: {
22-
[key: string]: boolean;
23-
} = {};
21+
const currentDrawer: Record<string, boolean> = {};
2422

2523
interface IState {
2624
_self: DrawerChild;

src/DrawerWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Portal from 'rc-util/lib/PortalWrapper';
22
import * as React from 'react';
33

44
import Child from './DrawerChild';
5-
import { IDrawerProps, IDrawerChildProps } from './IDrawerPropTypes';
5+
import type { IDrawerProps, IDrawerChildProps } from './IDrawerPropTypes';
66

77
interface IState {
88
open: boolean;

src/IDrawerPropTypes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Project: https://github.com/react-component/drawer
33
// Definitions by: jljsj33 <https://github.com/jljsj33>
44
// Definitions: https://github.com/react-component/drawer
5-
import { GetContainer } from 'rc-util/lib/PortalWrapper';
6-
import * as React from 'react';
7-
import ScrollLocker from 'rc-util/lib/Dom/scrollLocker';
5+
import type { GetContainer } from 'rc-util/lib/PortalWrapper';
6+
import type * as React from 'react';
7+
import type ScrollLocker from 'rc-util/lib/Dom/scrollLocker';
88

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

src/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ export function dataToArray(vars: any) {
44
}
55
return [vars];
66
}
7-
const transitionEndObject: {
8-
[key: string]: string;
9-
} = {
7+
const transitionEndObject: Record<string, string> = {
108
transition: 'transitionend',
119
WebkitTransition: 'webkitTransitionEnd',
1210
MozTransition: 'transitionend',

0 commit comments

Comments
 (0)