You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when I find refs of "doSome" from file2.js It will give me refs of this file only.
But if I remove/comment third line from file1.js then it will return correct references.
So its seems like there is something wrong with requirejs. I am passing this plugin value plugins: {requirejs: {}, doc_comment: true, angular: true}
I tried to pass baseUrl as well. But its still not working.
I tried to debug tern code, So I am providing some more info. Hope that may help in investigating this issue.
In infer.js
function isObjTypeProto(type) {
// Check whether the found type has objType in its hierarchy
while (type && type != objType) {
// Ff property is overriden higher in the hierarchy, return false
if (type.props[name] || (type.maybeProps && type.maybeProps[name])) {
return false;
}
type = type.proto;
}
return type;
}
Here the value of type is different in both cases.
With require statementin file1, value of type is -
maybeProps: null
name: undefined
origin: "file1.js"
props: Object
proto: undefined
objType value is -
maybeProps: null
name: "exports"
origin: "TestingFileForRefs.js"
props: Object
proto: Object
If we remove that require statement from file1 then type and objType are same.
Please help me to find out whats going wrong ?
The text was updated successfully, but these errors were encountered:
In this case when I do findRefs this return only last 2 references. But If i remove 3rd line then It will return all three refs.
Note :- This work fine in tern demo.
I am trying to find all references of a symbol.
For Example-
file1.js -
file2.js -
So when I find refs of "doSome" from file2.js It will give me refs of this file only.
But if I remove/comment third line from file1.js then it will return correct references.
So its seems like there is something wrong with requirejs. I am passing this plugin value plugins: {requirejs: {}, doc_comment: true, angular: true}
I tried to pass baseUrl as well. But its still not working.
I tried to debug tern code, So I am providing some more info. Hope that may help in investigating this issue.
In infer.js
Here the value of type is different in both cases.
With require statementin file1, value of type is -
maybeProps: null
name: undefined
origin: "file1.js"
props: Object
proto: undefined
objType value is -
maybeProps: null
name: "exports"
origin: "TestingFileForRefs.js"
props: Object
proto: Object
If we remove that require statement from file1 then type and objType are same.
Please help me to find out whats going wrong ?
The text was updated successfully, but these errors were encountered: