TypeScript Definition for Backbone.Syphon -


I have come across an unusual barrier with TypeScript regarding the definitions I write a definition file for the library (very simple) Have tried backbone There are only two methods in the cypher object, serialize and deserialize . However, I'm unable to successfully write a definition file.

My current definition file is as follows (due to quitting deserialize for this time, because it is orthogonal in the hands of the question):

  module backbone class syllabus {to serialize Define (see: backbone.view, option: any): any; }}  

However, when backbone If you try to use Sifon.serialize () , then the error I get is:

Error TS 2094: type of property 'serialize' type 'backbone. Syphon 'does not exist at the value of

This should look like this:

  Define the module babon. Siphone {function serialize (see: backbone option, any): any; // deserialize the function (/ * etc * /): any; Class key reactor sets {registerDefault (talk: ($ el: any) => zero): zero; } Module key actuators {function register (name: string, object: ($ el: any) => any): zero; } / * ... and ... * /}  

Comments