Loading ...
Sorry, an error occurred while loading the content.

2448Re: [jslint] Error reported by JSLint I don't understand

Expand Messages
  • Douglas Crockford
    Jul 6, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, Jérôme DESPATIS <jerome@...> wrote:
      >
      > Thanks for your answer,
      >
      > As it's a type confusion, of course I can hide them with tolerate type
      > confusion.
      > But this setting is quite useful, I prefer to correct the error, and
      > force JSLint to check for type confusion.
      >
      > The fact is I really don't understand why there's type confusion here...
      >
      > Here is a short code that does nothing, with a Type confusion, someone
      > could explain me why there's a type confusion please ?
      >
      > JSLint reports the error:
      >
      > Problem at line 4 character 36: Type confusion: function and '[': array.
      >
      > djTagonomyStore.fetch({'sort': [{'attribute': "tag"}], 'query': {'type': ...

      You can specify types of properties with the /*properties */ directive. It can take a wildcard type as *. So,

      /*properties query: * */
    • Show all 9 messages in this topic