fabiospampinato / cash

An absurdly small jQuery alternative for modern browsers.
MIT License
6.52k stars 264 forks source link

Augmenting Cash with my own functions #380

Open RobinRadic opened 3 years ago

RobinRadic commented 3 years ago

image

Unlike many other typescript libraries. Doing something like:


declare module 'cash-dom' {
    export interface Cash
        ensureClass(className, remove):Cash
    }
}

Doesn't work. Neither in the same .ts file, a seperate .d.ts file and with or without the export before the interface, in case that would.

Ofcourse, in the .d.ts file i'm adding

import 'cash-dom'
// repetition of previous code

How to augment Cash?

fabiospampinato commented 3 years ago

This worked for me when I wrote it, but I think at some point it stopped working.

I'll have to look more closely into it. Suggestions welcome.