frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

modular type declaration && graphQL schema.ts types [2:32pm] #27

Open frankcollins3 opened 1 year ago

frankcollins3 commented 1 year ago

attempting to do: create a file from which to export types to be used throughout app to create modularity and reusability with types & interfaces utility/interfaceNtypes.ts: type Pokemon = { name: String }

graphql/schema.ts type Pokemon { id: Int, name: String }

error: there needs to be an equal sign in the conventional Typescript type, whereas graphql typeDefs types don't have that. They seem to follow more so the interface type.

Screen Shot 2023-07-11 at 2 30 47 PM

Screen Shot 2023-07-11 at 2 30 39 PM

proposed approach: 0: skip. App was deployment ready before switching machine. Deploy; learn this concept for the following app.

1: try with interfaces.

2: see step 0:

frankcollins3 commented 1 year ago

import {PokemonInterface} from "utility/interfaceNtypes.ts 👎 type Pokemon PokemonInterface

// first had problem with the interface itself.. wondering if export const or export interface would work. 👍 Export interface

[2:40pm]

not even going to ask chatGPT just going to move on