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

[Lint]: 'callback' is not a function #47

Closed
paulvi opened this issue Jul 13, 2015 · 5 comments
Closed

[Lint]: 'callback' is not a function #47

paulvi opened this issue Jul 13, 2015 · 5 comments
Milestone

Comments

@paulvi
Copy link

paulvi commented Jul 13, 2015

for code

/**
 * @param {number} millis
 * @param {function} callback
 * */
function sleep(millis, callback) {
    setTimeout(function() {
        callback();
    }, millis);
}



sleep('a','b');

sleep('a','b');

I got only one error for callback(); line:

[Lint]: 'callback' is not a function

.tern-project

{   "ide":{},
    "doc_comment":{"strong":true},
    "lint":{},
    "plugins":{
        "lint":{
            "config":{}
        },
        "node":{}
    },
    "libs": ["ecma5","browser"]
}

I tried with 0.10 and
1.0.0.201507101609

@paulvi
Copy link
Author

paulvi commented Jul 13, 2015

lint47

@angelozerr
Copy link
Owner

Its because doc_comment dorsnt support function param ihad created a pr for tern but it seems param function is not official

@angelozerr angelozerr added this to the 0.6.0 milestone Dec 5, 2015
@angelozerr
Copy link
Owner

@paulvi with last version of ternjs it works now. But you must use upper case like:

@param {Function} callback

@paulvi
Copy link
Author

paulvi commented Dec 6, 2015

What is the difference between Function and function ?

@angelozerr
Copy link
Owner

I don't know. When I have tested, it works like this

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

No branches or pull requests

2 participants