Manaus Manaus - 8 months ago 49
TypeScript Question

Aliasing a class method in definition

I'm trying to make a typing definition file for Mootools, namely the aliasing of

. I made a interface for
, which is

interface Document {
id(el: string): Element;

In JQuery.d.ts
is aliasing the JQuery object, how can I alias an object method?



The 'aliasing' is performed by the implementation.

In the definition, simply declare the function you want to expose, for example

declare/export function $(el: string): Element;