Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate repo to TypeScript #4

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

jonathanle03
Copy link

No description provided.

@jonathanle03 jonathanle03 self-assigned this Sep 15, 2024
@@ -10,7 +10,11 @@ export const metadata = {
description: "Firebase Setup Integration with Next.js",
};

export default function RootLayout({ children }) {
type Props = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • use interface
  • lowercase props

src/utils/api.ts Outdated
@@ -0,0 +1,21 @@
type Body = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • interface
  • all lowercase

@@ -1,7 +1,16 @@
import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";

const firebaseConfig = {
type Config = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • interface
  • lowercase
  • check to see if firebase alr has a config type u can use

src/utils/api.ts Outdated
email: string;
}

interface apifunc {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should just be called request

src/utils/api.ts Outdated
@@ -0,0 +1,21 @@
interface body {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

body should be defined by some HTML/JS generated thing or not at all, this is a general API wrapper so we cant conform to just the name and email

tsconfig.json Outdated
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strict should be true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants