Skip to content

fix(tooltip): Fix type for timer #1998

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
wants to merge 1 commit into from
Closed

fix(tooltip): Fix type for timer #1998

wants to merge 1 commit into from

Conversation

kvcpr
Copy link

@kvcpr kvcpr commented Nov 27, 2016

I fixed type error
Type 'Timer' is not assignable to type 'number'

Now _hideTimeoutId is type of NodeJS.Timer

I fixed type error
`Type 'Timer' is not assignable to type 'number'`

Now `_hideTimeoutId` is type of `NodeJS.Timer`
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 27, 2016
@jelbourn
Copy link
Member

@kacepe The correct type is actually number. It sounds like you're using the typings for NodeJS in your project instead of the typings for the browser. You want to use lib.es6.d.ts when building material (since it is only meant to run on a browser platform).

The other changes in this PR will also break our build (we do not use angular-cli).

@jelbourn jelbourn closed this Nov 28, 2016
crisbeto added a commit to crisbeto/material2 that referenced this pull request Dec 29, 2016
* 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.
kara pushed a commit that referenced this pull request 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
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.

3 participants