Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue3 + typescript support #1022

Open
kstan79 opened this issue Dec 18, 2022 · 11 comments
Open

Vue3 + typescript support #1022

kstan79 opened this issue Dec 18, 2022 · 11 comments

Comments

@kstan79
Copy link

kstan79 commented Dec 18, 2022

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
Copy link
Owner

Hello,

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

@kstan79
Copy link
Author

kstan79 commented Dec 19, 2022

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
Copy link
Owner

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

Thanks again.

Best Regards
Tony

@EmilianoNahuelDias
Copy link

Hello! When is the new release?

@tonytomov
Copy link
Owner

tonytomov commented May 3, 2023

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
Copy link
Author

kstan79 commented May 3, 2023

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
Copy link

mlvn23 commented May 18, 2023

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
Copy link
Author

kstan79 commented Aug 1, 2023

so far any progress?

@tonytomov
Copy link
Owner

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

Thank you.

@kstan79
Copy link
Author

kstan79 commented Aug 6, 2023

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
Copy link
Author

kstan79 commented Jan 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants