Skip to content
This repository has been archived by the owner on May 21, 2018. It is now read-only.

Specifications

cskeppstedt edited this page Nov 16, 2012 · 2 revisions
  • Only public properties are considered

  • Right now, System.DateTime is considered a string in the type translation. The main reason is that the JSON serialization in .NET MVC will typically serialize a DateTime as "\/Date(ticks)\/". Note: you can override the type of an interface member, see Customization.

  • The type translation works like this, from C# => TypeScript, for each property:

    • Built-in numeric type (int, double, float, etc.) => number
    • string => string
    • A class marked with [TypeScriptInterface] => lookup the generated TypeScript name
    • Otherwise => any
    • For Collection<T>, List<T>, IList<T> and T[] => lookup type for T as above, and return T[].
Clone this wiki locally