File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ module.exports = {
3131 '!components/*/style/index.tsx' ,
3232 '!components/style/index.tsx' ,
3333 '!components/*/locale/index.tsx' ,
34- '!components/form /__tests__/type.test.tsx' ,
34+ '!components/* /__tests__/type.test.tsx' ,
3535 '!components/**/*/interface.{ts,tsx}' ,
3636 ] ,
3737 transformIgnorePatterns,
Original file line number Diff line number Diff line change 1+ /* eslint-disable */
2+ import React from 'react' ;
3+ import Icon from '..' ;
4+ import { ReactComponent as logo } from './logo.svg' ;
5+
6+ describe ( 'Icon TypeScript test' , ( ) => {
7+ it ( 'empty test case placeholder to avoid jest error' , ( ) => {
8+ // empty
9+ } ) ;
10+ } ) ;
11+
12+ < Icon component = { logo } /> ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export interface IconProps {
6767 title ?: string ;
6868 onKeyUp ?: React . KeyboardEventHandler < HTMLElement > ;
6969 onClick ?: React . MouseEventHandler < HTMLElement > ;
70- component ?: React . ComponentType < CustomIconComponentProps > ;
70+ component ?: React . ComponentType < CustomIconComponentProps | React . SVGProps < SVGSVGElement > > ;
7171 twoToneColor ?: string ;
7272 viewBox ?: string ;
7373 spin ?: boolean ;
Original file line number Diff line number Diff line change 1- declare module '*.svg' ;
1+ // https://github.com/facebook/create-react-app/blob/f09d3d3a52c1b938cecc977c2bbc0942ea0a7e70/packages/react-scripts/lib/react-app.d.ts#L42-L49
2+ declare module '*.svg' {
3+ import * as React from 'react' ;
4+
5+ export const ReactComponent : React . FunctionComponent < React . SVGProps < SVGSVGElement > > ;
6+
7+ const src : string ;
8+ export default src ;
9+ }
210
311declare module 'rc-calendar*' ;
412
You can’t perform that action at this time.
0 commit comments