vue-video-section icon indicating copy to clipboard operation
vue-video-section copied to clipboard

Add typescript definition

Open GauthierPLM opened this issue 6 years ago • 3 comments

GauthierPLM avatar Jul 12 '19 07:07 GauthierPLM

Hey there! Thanks for checkout out vue-video-section.

I see that you'd like to see vue-video-section support TypeScript - I think that's a great idea. I actually don't use TypeScript myself, so let me look into this and I'll update here. I'm a bit swamped at this exact moment - but I will get on this as soon as possible. Thanks for the suggestion!

johndatserakis avatar Jul 14 '19 18:07 johndatserakis

I am also a beginner in TypeScript (reason why I did not made the typing myself) but I think only a definition file is missing (types.d.ts for ex) to make it fully usable.

Right now, simply importing the component creates an error from TypeScript language server complaining about module not being found (but the code still works).

GauthierPLM avatar Jul 15 '19 01:07 GauthierPLM

Hey Gauthier, so I've been looking into this for a bit now and I'm having some issues adding the ./types/index.d.ts file.

Basically, because I've never actually set up a TypeScript project before, it's proving pretty tough trying to add the definitions to this existing project - the last thing I want to do is break something in the current working project of course.

In my research, I found a thread with some suggestions on how to get rid of the errors you mentioned: https://stackoverflow.com/a/12695001/8014660. I think this can help this repo's TypeScript compatibility in its current state. Maybe you can try them out and let me know.

As far as adding definitions to this repo, I'd be more than happy to accept a pull request that adds TypeScript support, I know you said you were kinda new to TypeScript as well - so maybe someone can step in.

Hopefully the thread I linked can help for now to get rid of the errors.

johndatserakis avatar Jul 29 '19 16:07 johndatserakis