tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

Vue3 + typescript support #1022

Open kstan79 opened 1 year ago

kstan79 commented 1 year ago

I'm existing JQGrid user since many years ago. We wish to migrate our software into vue3/typescript environment. Can I know how far JQgrid support it?

tonytomov commented 1 year ago

Hello,

We are aware of this requirement and will try to support it in the next release - expected March, April 2023

kstan79 commented 1 year ago

it will be nice, im happy with jqgrid and I cant find suitable alternative in my project, i thought i need to make painful decision. if there is beta release kindly leave comment below i can help you test.

tonytomov commented 1 year ago

Thanks. Sure I will let you know, when we are able to test and send you the work.

Thanks again.

Best Regards Tony

EmilianoNahuelDias commented 1 year ago

Hello! When is the new release?

tonytomov commented 1 year ago

Hello,

Sorry for the late answer. I was little busy these days.

Since I'm new to typescript I have some confusions when try to use it.

I followed the instructions from here: https://www.tutorialsteacher.com/typescript/converting-javascript-to-typescript

but nothing is changed at all. It seems that we need to completely rewrite the code, Is this is the case? Can you please recommend some way to make this without full rewrite the code.

Any help will be appreciated. As far as understand the goal is to create definition file, which will help developers ...

kstan79 commented 1 year ago

I don't think there is a good way to convert js become typescript with proper design. You may add .d.ts for make your js accessible only in short time?

mlvn23 commented 1 year ago

I think what you want is to write a facade and not re-write the javascript. There's an incomplete example in https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/jqgrid/index.d.ts

kstan79 commented 11 months ago

so far any progress?

tonytomov commented 11 months ago

I'm lost with this. Can you please point me for some direction on how this can be accomplished?

Thank you.

kstan79 commented 11 months ago

I'm tried to search online resources unfortunately I can't find suitable reference to you. imho below maybe some info for you:

Basically you need to define function return type,, variables type in a defination file as below example

I think what you want is to write a facade and not re-write the javascript. There's an incomplete example in https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/jqgrid/index.d.ts

the defination file with extension .d.ts, We need .d.ts to tell IDE (like vscode) what is the function return, variable type. example: export function getArrayLength(arr: string[]): number; it tell IDE the getArrayLength() have parameter arr, which is array of string, and it will return number

I not so sure how to build jqgrid as library, you may try check this link, incorprate with declare .d.ts file. It maybe helpful https://bobbyhadz.com/blog/typescript-import-javascript-files

kstan79 commented 6 months ago

there is some example inside here for declare props/interface in .d.ts hope it helpful: https://github.com/antoniandre/vue-cal/issues/168