justinmahar / SublimeCSAutocompletePlus

CoffeeScript autocompletions and more!
172 stars 12 forks source link

Support for global variables that return a type in custom type definitions #24

Open Iristyle opened 11 years ago

Iristyle commented 11 years ago

Similar to my last request in #23 ... there are times where a global in AngularJS like $document, is not a type, but rather an instance of a type.

{
  // Map function names to types.
  "coffee_autocomplete_plus_function_return_types":
  [
    {
      "function_names": ["$document"],
      "type_name": "jqLite"
    }
  ]
}

So what I have here isn't correct, because to get intellisense on my jqLite type, I have to use $document(). rather than $document..

It seems that there isn't a convention anywhere in the custom type definitions to map a global name to a type.

It would be awesome if there was one :smiley_cat: