AlertifyJS icon indicating copy to clipboard operation
AlertifyJS copied to clipboard

Typings request.

Open ghost opened this issue 8 years ago • 9 comments

Typings would be really helpful, as we use alertifyjs in our typescript project.

ghost avatar Feb 21 '17 06:02 ghost

I intend to do a complete re-write using typescript, but still can't find the time!

MohammadYounes avatar Feb 26 '17 06:02 MohammadYounes

@AloeDream Check out these typings.

MohammadYounes avatar Mar 01 '17 10:03 MohammadYounes

@MohammadYounes, thanks for typing link, guess its ok for basic shape, but it would be great to get full library typing experience with information about different options and method and underling types especially when creating custom dialogs.

odrozd avatar Mar 22 '17 18:03 odrozd

@MohammadYounes Any update on the typings? The link mentioned seems to be dead. Any help would be appreciated.

apratheek avatar Aug 21 '17 10:08 apratheek

@apratheek Seems the author deleted the repo.

It's still on my todo list. But, unfortunately I can't find the time to do it.

MohammadYounes avatar Aug 21 '17 18:08 MohammadYounes

Sad, we have to switch to another library for this reason...

CoskunSunali avatar Jun 10 '18 14:06 CoskunSunali

@CoskunSunali @apratheek @AloeDream

1. General approach

  1. Create a global.d.ts including declare var alertify: object;
  2. Add the typings file global.d.ts to your TypeScript configuration
  3. Instead of object you could define a interface including all the functions

Did not try it, but that just it...

2. DefinitelyTyped approach

npm install --save @types/alertify

See: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/alertify

henryruhs avatar Dec 11 '18 22:12 henryruhs

@MohammadYounes Issue could be closed I think

henryruhs avatar Dec 16 '18 11:12 henryruhs

@redaxmedia Why? we are still missing detailed typings - @types/alertify is for the old alertify.js.

MohammadYounes avatar Dec 16 '18 11:12 MohammadYounes