Skip to content

Use Solution Style tsconfig.json Files #17758

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

Closed
5 of 15 tasks
xiaoxiangmoe opened this issue May 19, 2020 · 2 comments
Closed
5 of 15 tasks

Use Solution Style tsconfig.json Files #17758

xiaoxiangmoe opened this issue May 19, 2020 · 2 comments

Comments

@xiaoxiangmoe
Copy link

xiaoxiangmoe commented May 19, 2020

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

Current, we can use describe, it, test, expect in app. Because we use "types": ["jasmine","node"] in tsconfig.json. And this is for tsconfig.spec.json, not for tsconfig.app.json.

In order to get a better IDE experience, we can use “Solution Style” tsconfig.json Files in TypeScript 3.9

// tsconfig.json
{
  "files": [],
  "references": [
    { "path": "./tsconfig.app.json" },
    { "path": "./tsconfig.spec.json" },
  ]
}
{
  // tsconfig.app.json
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "module": "es2020",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "lib": [
      "es2018",
      "dom"
    ],
    "types": []
  },
  "files": [
    "src/main.ts",
    "src/polyfills.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ]
}
{
  //tsconfig.spec.json
  "extends": "./tsconfig.app.json",
  "compilerOptions": {
    "outDir": "./out-tsc/spec",
    "types": [
      "jasmine",
      "node"
    ]
  },
  "files": [
    "src/test.ts",
    "src/polyfills.ts"
  ],
  "include": [
    "src/**/*.spec.ts",
    "src/**/*.d.ts"
  ]
}
@alan-agius4
Copy link
Collaborator

alan-agius4 commented May 19, 2020

Hi @xiaoxiangmoe,

Kindly search for open issues and PRs, before opening a new one.

There is already a PR for this #17586 and is very close to get landed.

Thanks.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants