Skip to content

build: avoid typing errors in TypeScript 2.1 and update gulp-typescript #2456

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

Merged
merged 1 commit into from
Jan 4, 2017

Conversation

crisbeto
Copy link
Member

  • Avoids a couple of errors that show up when trying to compile the project against TypeScript 2.1 ("Cannot redeclare block-scoped variable 'module'" and "Type 'Timer' is not assignable to type 'number'"). Both errors were due to us loading both the Node and browser typings, which were overlapping with each other (e.g. setTimeout in the browser returns a number, whereas in Node it returns a NodeJS.Timer).
  • Bumps to the latest version of gulp-typescript and switches to the new syntax for defining the Gulp task.
  • Fixes an error with the e2e-app tsconfig.json that showed up after updating the gulp-typescript.

Related to #1998.

* Avoids a couple of errors that show up when trying to compile the project against TypeScript 2.1 ("Cannot redeclare block-scoped variable 'module'" and "Type 'Timer' is not assignable to type 'number'"). Both errors were due to us loading both the Node and browser typings, which were overlapping with each other (e.g. `setTimeout` in the browser returns a `number`, whereas in Node it returns a `NodeJS.Timer`).
* Bumps to the latest version of `gulp-typescript` and switches to the new syntax for defining the Gulp task.
* Fixes an error with the `e2e-app` tsconfig.json that showed up after updating the `gulp-typescript`.

Related to angular#1998.
@crisbeto crisbeto requested a review from jelbourn December 29, 2016 12:24
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 29, 2016
@clydin
Copy link
Member

clydin commented Dec 29, 2016

You should be able to remove the require('typescript') line as well. The new version of gulp-typescript uses a peer dependency for typescript and will automatically use the installed version.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 3, 2017
@kara kara merged commit bdc48a8 into angular:master Jan 4, 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
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants