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

require.js + defs #1035

Open
wozjac opened this issue Mar 25, 2020 · 0 comments
Open

require.js + defs #1035

wozjac opened this issue Mar 25, 2020 · 0 comments

Comments

@wozjac
Copy link

wozjac commented Mar 25, 2020

Hi,

what should be the right config for such scenario below with require.js defs + type recognition?

define(["my/lib/Cart"],
    function(Cart) {
    var cart = new Cart(); 
    cart //<-- here I try to get the type of cart with "type" query

I want to bring my own definition of Cart with JSON type defiition - should it be done with override option of the requirejs plugin?

new tern.Server({
    "plugins": {
        "requirejs": {
            "override": {
                "my/lib/Cart": <my JSON type object>
...

or should it be with additional paths option?

new tern.Server({
    "plugins": {
        "requirejs": {
            "override": {
                "Cart": <my JSON type object>
            },
            paths: { "Cart": "my/lib" }
....

Regards,
Jacek

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

1 participant