jqGrid icon indicating copy to clipboard operation
jqGrid copied to clipboard

Vue3 + typescript support

Open kstan79 opened this issue 2 years ago • 11 comments

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?

kstan79 avatar Dec 18 '22 16:12 kstan79

Hello,

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

tonytomov avatar Dec 19 '22 14:12 tonytomov

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.

kstan79 avatar Dec 19 '22 15:12 kstan79

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

Thanks again.

Best Regards Tony

tonytomov avatar Dec 19 '22 15:12 tonytomov

Hello! When is the new release?

EmilianoNahuelDias avatar Apr 27 '23 20:04 EmilianoNahuelDias

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 ...

tonytomov avatar May 03 '23 07:05 tonytomov

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?

kstan79 avatar May 03 '23 07:05 kstan79

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

mlvn23 avatar May 18 '23 05:05 mlvn23

so far any progress?

kstan79 avatar Aug 01 '23 07:08 kstan79

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

Thank you.

tonytomov avatar Aug 06 '23 11:08 tonytomov

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 avatar Aug 06 '23 13:08 kstan79

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

kstan79 avatar Jan 06 '24 22:01 kstan79