Start a new topic

C# bindings from typescript definitions

Since there is now documentation for "Creating DuoCode Bindings", I really need help UNDERSTANDING what the equivalent C# binding definition of a typescript definition:

Things like: '[key: string]: SomeClassOrInterface'

and 'someMethod(someParams: { [key: string]: any; })'

and 'new <T>(): SomeClassOrInterface<T>'

Basically i have attached a few snippets from "Knockout.d.ts".

Can SOMEONE PLEASE make the equivalent C# classes from the the following so i can understand better what they are supposed to be in c#. The following are

a couple of definitions i just don't understand how to make the C# equivalent.


interface KnockoutComputedFunctions<T> {

    [key: string]: KnockoutBindingHandler;


interface KnockoutSubscribableStatic {

    fn: KnockoutSubscribableFunctions<any>;

    new <T>(): KnockoutSubscribable<T>;


interface KnockoutSubscribable<T> extends KnockoutSubscribableFunctions<T> {

 extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable<T>;


interface KnockoutObservableArrayStatic {

    fn: KnockoutObservableArrayFunctions<any>;

    <T>(value?: T[]): KnockoutObservableArray<T>;


interface KnockoutObservable<T> extends KnockoutSubscribable<T>, KnockoutObservableFunctions<T> {

 (): T;

 (value: T): void;

 peek(): T;

 valueHasMutated?:{(): void;};

 valueWillMutate?:{(): void;};

    extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable<T>;


interface KnockoutTemplateSources {

    domElement: {

     prototype: KnockoutTemplateSourcesDomElement

     new (element: Element): KnockoutTemplateSourcesDomElement


    anonymousTemplate: {

  prototype: KnockoutTemplateAnonymous;

  new (element: Element): KnockoutTemplateAnonymous;




Login or Signup to post a comment