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

Flow to Typescript #191

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Flow to Typescript #191

wants to merge 1 commit into from

Conversation

gagoar
Copy link
Contributor

@gagoar gagoar commented Nov 23, 2020

Description.

I've translated everything inside src/ to typescript

TODO

  • Tests passing
  • Missing scripts replacements.
  • missing prettier
  • make types more strict. (Need some guidance here) maybe @IvanGoncharov or @acao can guide me here.

This PR is stacked out of #190

@acao
Copy link
Member

acao commented Nov 24, 2020

@gagoar the build failure shows the issue is with how we're set up to resolve the underlying netlify functions. there was some ways to resolve that, similarly to how binary paths are aliased using a static file that module.exports = require('./dist/file') so, somehow this is conflicting with it. it could be you are trying to compile typescript in a directory it's not configured for? i'm not sure

@gagoar
Copy link
Contributor Author

gagoar commented Nov 24, 2020

@gagoar the build failure shows the issue is with how we're set up to resolve the underlying netlify functions. there was some ways to resolve that, similarly to how binary paths are aliased using a static file that module.exports = require('./dist/file') so, somehow this is conflicting with it. it could be you are trying to compile typescript in a directory it's not configured for? i'm not sure

yea I didn't look deeply into it, till my doubs about the types and how strict I'm doing things was addressed. I will work on this soon!

thanks for looking into it.

@@ -30,7 +30,7 @@ import VehicleType from './vehicle';
/**
* The GraphQL type equivalent of the Film resource
*/
const FilmType = new GraphQLObjectType({
const FilmType: GraphQLObjectType = new GraphQLObjectType({
Copy link
Contributor Author

@gagoar gagoar Nov 24, 2020

Choose a reason for hiding this comment

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

for some reason if I remove the type from this assignment. I get:

const FilmType: any
The GraphQL type equivalent of the Film resource

'FilmType' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)```

.eslintrc Outdated Show resolved Hide resolved
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.

3 participants