Skip to content

Commit 16c1cb5

Browse files
Update types
1 parent 57e5688 commit 16c1cb5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

@types/global.d.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import * as React from 'react';
2-
3-
export {};
41
declare module 'react' {
52
// A type for the properties of a function component
63
interface CodeBlockHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -25,9 +22,11 @@ export type CodeBlockProps = React.DetailedHTMLProps<
2522
controls?: boolean;
2623
};
2724

28-
// A type for JSX markup
29-
declare module 'JSX' {
30-
interface IntrinsicElements {
31-
'code-block': CodeBlockProps;
25+
declare global {
26+
// A type for JSX markup
27+
namespace JSX {
28+
interface IntrinsicElements {
29+
'code-block': CodeBlockProps;
30+
}
3231
}
3332
}

0 commit comments

Comments
 (0)