Skip to content
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

Where's the equivalent of 'typings/browser.d.ts' for Angular RC1? #8513

Closed
curlyfro opened this issue May 6, 2016 · 4 comments
Closed

Where's the equivalent of 'typings/browser.d.ts' for Angular RC1? #8513

curlyfro opened this issue May 6, 2016 · 4 comments

Comments

@curlyfro
Copy link

curlyfro commented May 6, 2016

in Visual Studio 2015/angular betas i was able to get my typescript typings working by adding a reference path in my boot.ts:

/// <reference path="../node_modules/angular2/typings/browser.d.ts" />

this file doesn't exist under the rc @angular2 paths. does anyone know the equivalent or how to get the typings working for VS2015?

@ericmartinezr
Copy link
Contributor

It should be enough by installing es6-shim typings and adding typings/browser.d.ts (from the root folder).

Option1 :

typings install es6-shim --ambient --save

// In your app.ts
/// <reference path="typings/browser.d.ts" />

Option 2:

typings install es6-shim --ambient --save

// In your tsconfig.json
files : ["typings/browser.d.ts", "everything else..."]

Alternatively you can remove es6-shim typings, and if you're using TS >= 1.9 you can add lib: ["es6", "dom"] to your tsconfig.json.

@chickencoding123
Copy link

Another way would be to use 'es6' as the value of 'target' in your tsconfig.json. The errors you'll probably see on compile all go away.

@curlyfro
Copy link
Author

curlyfro commented May 6, 2016

thanks eric -- that worked!

@curlyfro curlyfro closed this as completed May 6, 2016
@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 8, 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

3 participants