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

My version of require.intellisense.js #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

areve
Copy link

@areve areve commented Oct 5, 2013

I spent ages researching this and finally came up with this file; achieving intellisense throughout my project. I'm not sure what the setTimeout was achieving nor calling onScriptLoad, what doesn't happen now I've not called it?

In the latest version my test examples (below) did not work at all. Perhaps partly because my requirejs.config is complicated and needed loading at the right time, but also the code did not support the requirejs global. I guess this project needs some a test project creating. I tried very hard to get Visual Studio to let me know the path of a javascript path it has loaded so that defines can be anonymous but I don't believe it can be done. In my test code res and $ have intellisense the second time I use they continue to work forever.

define('foobar', ['res', 'jquery'], function (res, $) {
    // res and $ have intellisense here
}

requirejs(['res', 'jquery'], function (res, $) {
    // res and $ have intellisense here
}

I spent ages researching this and finally came up with this file achieving intellisense throughout my project. I'm not sure what the setTimeout was achieving nor calling onScriptLoad, what doesn't happen now I've not called it? 

In version I've forked from requirejs my test examples did not work at all, perhaps partly because my requirejs.config is complicated and needed loading at the right time, also the code did not support the `requirejs` global. I guess this project needs some tests. I tried very hard to get Visual Studio to let me know the path of a javascript path it has loaded so that defines can be anonymous but I believe it can't be done.

    define('foobar', ['res', 'jquery'], function (res, $) {
        // res and $ have intellisense here
    }

    requirejs(['res', 'jquery'], function (res, $) {
        // res and $ have intellisense here
    }
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.

1 participant