gnoverse / dsocial

Experimental: Social apps, tools, researchs and dApps on Gno.land
8 stars 4 forks source link

chore: Resolve ts:check errors, put in Makefile #132

Closed jefft0 closed 1 month ago

jefft0 commented 1 month ago

We want to use npm run ts:check in the Makefile, but first we must resolve the errors. This PR has five commits:

  1. The process.env object is created dynamically, so ignore errors for undefined values such as EXPO_PUBLIC_GNO_REMOTE.
  2. In types.ts, add NetworkMetainfo and GnoAccount. Correct the import to use @gno/types.
  3. In transport_web, it complains that "Could not find a declaration file" for imported packages react-native-polyfill-globals and react-native-fetch-api. We can't change the imported packages, so ignore these errors.
  4. In transport_web, add the "any" declaration to forEach((value:any, key:any).
  5. Now that the errors are fixed, we can update the Makefile. Add a target ts_check to do npm run ts:check. Add this as a dependency to the node_modules target, which is used by all the others.