angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.39k stars 2.46k forks source link

Typescript definitions #3720

Open nitech opened 9 years ago

nitech commented 9 years ago

I can't seem to find any TypeScript definitions for ui-grid. Is there any?

JLLeitschuh commented 9 years ago

No. ui grid is written in Angular 1 not Angular 2. Angular 1 is entirely html/css/javascript.

nitech commented 9 years ago

Yes, I realize that. A lot of people use TypeScript with Angular 1. A TypeScript definitions file for ui-grid would strengthen its position in the market.

JLLeitschuh commented 9 years ago

If you know how to add it a pull request would be appreciated.

nitech commented 9 years ago

If we end up using ui-grid, I will start writing one. Still evaluating different grids :-)

mvh Simon Pedersen 466 34 123

On Sat, Jun 13, 2015 at 6:36 PM, Jonathan Leitschuh < notifications@github.com> wrote:

If you know how to add it a pull request would be appreciated.

— Reply to this email directly or view it on GitHub https://github.com/angular-ui/ng-grid/issues/3720#issuecomment-111727612 .

DmitryEfimenko commented 9 years ago

+1. I realize there is a lot of code written already for ui-grid, but writing code in TypeScript has a lot of benefits (as angular core team suggests) and it really has nothing to do with the fact that ui-grid is written for angular 1, not 2. I'd recommend looking into TS in general if you are not familiar with it yet.

If someone started working on d.ts file, please share the work.

JLLeitschuh commented 9 years ago

How much work is there to implement a compiler as a build step?

DmitryEfimenko commented 9 years ago

adding a compilation step to the build process usually is a trivial task. I created a d.ts file here, which covers most methods, events, and properties for all features.

It'd be great if a UiGrid developer could review this before I submit it to DefinitelyTyped.

JLLeitschuh commented 9 years ago

I'm not willing to add a statically created typescript file. Is there any way that we could make this dynamic. Our API is subject to change and trying to keep a typed file updated is thwart with unhappy issue openers.

DmitryEfimenko commented 9 years ago

Of course there is a way. I'm sure Angular team is doing it somehow. Some information to consider:

From what I can see - the .js files would have to be renamed to .ts and we'd go from there.

JLLeitschuh commented 9 years ago

This is not something the core team has the time to dedicate to adding. Enhancements are usually added because someone takes the time to add it and make a pull request. Come chat with us in gitter. Gitter

mkalinov commented 6 years ago

Hi guys, Is it what u'r looking for? https://www.npmjs.com/package/@types/ui-grid => https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ui-grid

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.