Skip to content

Commit fd4d89e

Browse files
committedJul 8, 2024·
Templates: Export ButtonProps and HeaderProps interfaces
Export the ButtonProps and HeaderProps interfaces to make them accessible to avoid issues with Typescript relying on exported interfaces when declaration files should be created.
1 parent d5b0fb7 commit fd4d89e

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed
 

‎code/frameworks/nextjs/template/cli/ts-3-8/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import './button.css';
33

4-
interface ButtonProps {
4+
export interface ButtonProps {
55
/**
66
* Is this the principal call to action on the page?
77
*/

‎code/frameworks/nextjs/template/cli/ts-3-8/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type User = {
77
name: string;
88
};
99

10-
interface HeaderProps {
10+
export interface HeaderProps {
1111
user?: User;
1212
onLogin?: () => void;
1313
onLogout?: () => void;

‎code/frameworks/nextjs/template/cli/ts-4-9/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import './button.css';
33

4-
interface ButtonProps {
4+
export interface ButtonProps {
55
/**
66
* Is this the principal call to action on the page?
77
*/

‎code/frameworks/nextjs/template/cli/ts-4-9/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type User = {
77
name: string;
88
};
99

10-
interface HeaderProps {
10+
export interface HeaderProps {
1111
user?: User;
1212
onLogin?: () => void;
1313
onLogout?: () => void;

‎code/renderers/react/template/cli/ts-3-8/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import './button.css';
33

4-
interface ButtonProps {
4+
export interface ButtonProps {
55
/**
66
* Is this the principal call to action on the page?
77
*/

‎code/renderers/react/template/cli/ts-3-8/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type User = {
77
name: string;
88
};
99

10-
interface HeaderProps {
10+
export interface HeaderProps {
1111
user?: User;
1212
onLogin?: () => void;
1313
onLogout?: () => void;

‎code/renderers/react/template/cli/ts-4-9/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import './button.css';
33

4-
interface ButtonProps {
4+
export interface ButtonProps {
55
/**
66
* Is this the principal call to action on the page?
77
*/

‎code/renderers/react/template/cli/ts-4-9/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type User = {
77
name: string;
88
};
99

10-
interface HeaderProps {
10+
export interface HeaderProps {
1111
user?: User;
1212
onLogin?: () => void;
1313
onLogout?: () => void;

0 commit comments

Comments
 (0)
Please sign in to comment.