Comments (2)
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.
from tern-closure.
Hmm, this could be really tricky.
I know but in AngularJS Eclipse (https://github.com/angelozerr/angularjs-eclipse) I have more and more issues about this feature. More once this feature will be done, I could validate too the parameters with tern-lint (https://github.com/angelozerr/tern-lint/wiki/Validation-Rules)
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.
JS framework uses a lot of object litteral and I find it's very hard to know which properties you can use it.I would like to for instance support this feature too for Google Maps Tern plugin https://github.com/angelozerr/tern.java/wiki/Tern-&-Google-Maps-support
As you are very talented, I would like to find a clean mean to support objet litteral inside tern. Hope you will able to help me. Many thank's!
from tern-closure.
Related Issues (20)
- Function type expression support
- Expose type nullability information
- Support union types HOT 2
- Support optional argument types
- Support varargs
- Interface multiple inheritance
- Minimal requirements loading HOT 1
- Include condensed type definition file of Closure library HOT 2
- Support generics
- Issues with JSDoc types missing braces.
- Support autocompletion of names in comments
- Support go-to-definition for type strings in JSDoc and goog.require
- Go-to-overriden-method
- Document installation with tern.java HOT 3
- Include Closure base.js definitions
- TypeError: Cannot read property 'name' of null HOT 2
- tern-closure requires version of tern too old HOT 8
- Add support for goog.module HOT 1
- tern-closure and atom-tern HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tern-closure.