edge icon indicating copy to clipboard operation
edge copied to clipboard

current `tsconfig.json` throws errors

Open i8ramin opened this issue 6 years ago • 2 comments

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/"]
    }
  }
}

i8ramin avatar Feb 11 '19 14:02 i8ramin

Was this the tsconfig in the example gist?

mrkurt avatar Feb 26 '19 16:02 mrkurt

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)

i8ramin avatar Apr 10 '19 14:04 i8ramin