superfly / edge

A set of useful libraries for Edge Apps. Run locally, write tests, and integrate it into your deployment process. Move fast and maybe don't break things? Because, gosh darnit, you're an adult.
https://fly.io
Apache License 2.0
143 stars 10 forks source link

current `tsconfig.json` throws errors #46

Open i8ramin opened 5 years ago

i8ramin commented 5 years ago

Not sure if this issue has something to do with my local dev environment, but I was getting tons of TS errors and the only way to fix it was to update my tsconfig.json to the following:

{
  "include": ["./index.ts"],
  "compilerOptions": {
    "target": "es5",
    "lib": ["es2015", "dom"],
    "outDir": "./build/",
    "baseUrl": ".",
    "paths": {
      "@fly/cdn": ["./src/"]
    }
  }
}
mrkurt commented 5 years ago

Was this the tsconfig in the example gist?

i8ramin commented 5 years ago

the tsconfig in the example gist seems to also be incomplete:

{
  "include": ["./index.ts"],
  "compilerOptions": {
    "outDir": "./build/",
    "baseUrl": ".",
    "paths": {
      "@fly/cdn": ["./src/"]
    }
  }
}

Here is the final version of my tsconfig that seems to work:

{
  "include": ["./index.ts"],
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "moduleResolution": "node",
    "lib": [
      "es2017",
      "dom"
    ],
    "outDir": "./build/",
    "declaration": true,
    "strict": true,
    "noImplicitAny": false,
    "baseUrl": ".",
    "paths": {
      "@fly/cdn": ["./src/"]
    }
  }
}

Which was largely based off of the tsconfig in the root of the superfly/edge repo (https://github.com/superfly/edge/blob/master/tsconfig.json)