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

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

Expand Messages
  • Douglas Crockford
    ... You can specify types of properties with the /*properties */ directive. It can take a wildcard type as *. So, /*properties query: * */
    Message 1 of 9 , 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: * */
    • Jérôme DESPATIS
      Ok thanks Douglas ... -- Jérôme Despatis jerome@despatis.com [Non-text portions of this message have been removed]
      Message 2 of 9 , Jul 8, 2011
      • 0 Attachment
        Ok thanks Douglas

        Le 06/07/2011 20:15, Douglas Crockford a écrit :
        >
        > --- In jslint_com@yahoogroups.com
        > <mailto:jslint_com%40yahoogroups.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: * */
        >
        >


        --
        Jérôme Despatis
        jerome@...



        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.