tonytomov / jqGrid

jQuery grid plugin

Home Page:www.trirand.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue3 + typescript support

kstan79 opened this issue · 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?

Hello,

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

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.

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

Thanks again.

Best Regards
Tony

Hello! When is the new release?

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

commented

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?

commented

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

commented

so far any progress?

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

Thank you.

commented

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

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