This repository was archived by the owner on Jun 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const Link: React.FC<LinkProps> = ({
11
11
} ) => {
12
12
const formattedAriaLabel = _ . capitalize ( ariaLabel ) ;
13
13
14
- let linkProps : React . AnchorHTMLAttributes < { } > = {
14
+ let linkProps : React . AnchorHTMLAttributes < Element > = {
15
15
className : className || '' ,
16
16
} ;
17
17
@@ -73,7 +73,7 @@ export const Link: React.FC<LinkProps> = ({
73
73
) ;
74
74
} ;
75
75
76
- type BaseProps = React . AnchorHTMLAttributes < { } > & {
76
+ type BaseProps = React . AnchorHTMLAttributes < Element > & {
77
77
children : React . ReactNode ;
78
78
className ?: string ;
79
79
ariaLabel ?: string ;
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import { PrimeHeader, PrimeContent } from 'modules/Home/styled';
14
14
* The second parameter is for typing URL queries
15
15
*/
16
16
const Data : i . NextPageReduxComponent < DataProps , DataQueries > = ( { data, query } ) => {
17
+ // This line here is to test Redux functionality
18
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
19
const dataLoading = useSelector ( ( state ) => state . data . loading ) ;
18
20
19
21
return (
Original file line number Diff line number Diff line change @@ -7,26 +7,22 @@ declare const __TEST__: boolean;
7
7
8
8
// extend window object
9
9
interface Window {
10
- __REDUX_DEVTOOLS_EXTENSION__ : Function ;
10
+ __REDUX_DEVTOOLS_EXTENSION__ : ( ) => ( ) => void ;
11
11
__NEXT_REDUX_STORE__ : any ;
12
12
}
13
13
14
- declare interface NodeModule {
15
- hot : {
16
- accept ( path ?: string , callback ?: ( ) => void ) : void ;
17
- } ;
18
- }
19
14
20
15
// We have to declare how files other than .ts(x) or .js(x) are handled by our codebase because
21
16
// Typescript does not know we are handling these files with Webpack.
22
17
declare module '*.json' {
23
- const value : object ;
18
+ type Json = string | number | boolean | { [ key : string ] : Json } | Json [ ] | null ;
19
+ const value : Json ;
24
20
export default value ;
25
21
}
26
22
27
23
// Image files
28
24
declare module '*.svg' {
29
- const value : React . ReactComponentElement ;
25
+ const value : React . ComponentType < React . SVGProps < SVGSVGElement > > ;
30
26
export = value ;
31
27
}
32
28
declare module '*.gif' {
@@ -46,7 +42,7 @@ declare module '*.png' {
46
42
export = value ;
47
43
}
48
44
49
- // Image files external import
45
+ // Image files external import are always strings
50
46
declare module '*.svg?external' {
51
47
const value : string ;
52
48
export = value ;
You can’t perform that action at this time.
0 commit comments