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
{{ message }}
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
Hmm, this could be really tricky. We don't even know what the properties should be for the second argument for createDom (it's typed as (Object|null|string|undefined)), and even if we did we'd have to map that type onto the argument we're passing in (Tern doesn't support that currently), and I'm guessing we would have trouble with the parser here. In this particular instance, you really could pass any keys in for the properties.
I'm also not sure that that this is common enough to be all that helpful even if we did get it working.
So I have started to develop this feature for AngularJS (see ternjs/tern#387)
The basic idea is to hard code the JSON schema of the object (ex : createDom has style property, etc) and attach this schema in the objectType retrieved by the function declared with !effect. In this function we search the object litteral and attach the well JSON schema.
After that I use completion hook to search ObjectExpression and test if the current objectType have JSON schema attached. If I have a JSON schema, I populate the tern completion with missing properties.
We don't even know what the properties should be for the second argument for createDom
Yes I know, We need to do that with !effect function
In this particular instance, you really could pass any keys in for the properties.
Sorry I don't understand?
I'm also not sure that that this is common enough to be all that helpful even if we did get it working.
Even if tern doesn't support completion for object litteral (see issue 311), I create this issue because tern-closure needs that too.
For instance you can write this JS :
It should be very cool if we can have completion like this :
and :
The text was updated successfully, but these errors were encountered: