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

fix(util): replace implicit any in dom-controller #9511

Merged
merged 2 commits into from
Dec 6, 2016

Conversation

Manduro
Copy link
Contributor

@Manduro Manduro commented Dec 6, 2016

Short description of what this resolves:

Latest nightly throws me an error on serve.

[12:39:25]  typescript: node_modules/ionic-angular/util/dom-controller.d.ts, line: 2 
            Call signature, which lacks return-type annotation, implicitly has an 'any' return type. 

       L1:  export declare type DomCallback = {
       L2:      (timeStamp: number);
       L3:  };

[12:39:25]  transpile failed 

I'm using "noImplicitAny": true in my tsconfig.json compilerOptions, which some other developers will probably be using as well.

Changes proposed in this pull request:

  • Add an explicit void return type

Ionic Version: 2.0.0-rc.3-201612021933

@@ -7,7 +7,7 @@ import { nativeRaf } from './dom';
import { removeArrayItem } from './util';


export type DomCallback = { (timeStamp: number) };
export type DomCallback = { (timeStamp: number): any };
Copy link
Contributor

Choose a reason for hiding this comment

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

does it work if you use void instead of any?

Copy link
Contributor Author

@Manduro Manduro Dec 6, 2016

Choose a reason for hiding this comment

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

It does! Changed it. Be sure to squash as I can't do that quickly on github.

@Manduro Manduro changed the title fix(util): explicit any in dom-controller fix(util): replace implicit any in dom-controller Dec 6, 2016
@manucorporat manucorporat merged commit 6c0593c into ionic-team:master Dec 6, 2016
@manucorporat
Copy link
Contributor

Merged! thanks @Manduro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants