Skip to content

rc.0 update / tsconfig - missing type definitions #5110

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
jtsom opened this issue Feb 28, 2017 · 1 comment
Closed

rc.0 update / tsconfig - missing type definitions #5110

jtsom opened this issue Feb 28, 2017 · 1 comment

Comments

@jtsom
Copy link
Contributor

jtsom commented Feb 28, 2017

OS?

Any

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: linux x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 2.4.8

After updating a project to the rc.0 version of the CLI by following the steps in the wiki article, some types were now not found, at least using VSCode. Specifically trying to set a value on localstorage was showing an error that localstorage was not defined.

However, after looking at the changes to the tsconfig.json file, especially the one that was specified to be created at the root level, there is a difference in the 'lib' key. From the pre rc.0 tsconfig.json file:

    "lib": [
      "es2016",
      "dom"
    ],

In the new tsconfig.json file:

    "lib": [
      "es2016"
    ],

The missing dom key causes the Typescript system to not find the localstorage (and other) types.

I do see the dom key in the tsconfig.app.json file, and a mention that in V4 pull request (#4924) the tsconfig files will be inherited. but this is still an Angular v2 project, so these aren't.

@jtsom jtsom closed this as completed Feb 28, 2017
@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 Sep 6, 2019
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

1 participant