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

Doesn't work with typescript #18

Closed
alijaya opened this issue Apr 4, 2021 · 8 comments · Fixed by #60
Closed

Doesn't work with typescript #18

alijaya opened this issue Apr 4, 2021 · 8 comments · Fixed by #60

Comments

@alijaya
Copy link

alijaya commented Apr 4, 2021

It doesn't work well with typescript, it reports an error regarding typescript syntax

@dword-design
Copy link
Owner

@alijaya What is the error? Maybe we have to add a types.d.ts file? I'm actually not much into TypeScript yet, but I'm working on ot.

@alijaya
Copy link
Author

alijaya commented Apr 6, 2021

Sorry I don't have example here.
But when I try to include this module, it gives me an error regarding the typescript syntax, in my case is like this:
someFunction(param : number) {

It gives an error highlighting : number, I think because it's not a valid javascript syntax, it's typescript syntax.

I'm wondering if this module trying to parse the file directly, if that is the case, that could be a problem if the parser only recognize javascript code.

@panvakalo
Copy link

same here. I use nuxt-property-decorator and I declare my components of the page like this

@Component({
   components: {
      ...
   }
})

I get the following error:
image

@dword-design
Copy link
Owner

@panvakalo Let's continue with the decorators here: #2

@dword-design
Copy link
Owner

@panvakalo Write something into the linked issue so I can mention you.

@dword-design
Copy link
Owner

@alijaya Yeah that'll probably be the issue. I think we'd have to parse the file via typescript then.

@dword-design
Copy link
Owner

dword-design commented Apr 9, 2021

@alijaya I think it could be possible by detecting the lang property in vue files and then parsing it via TypeScript. Would open up complexity though for each transpiler. Best would be to use webpack and the pipeline resulting from the Nuxt config somehow.

@dword-design dword-design linked a pull request Aug 19, 2021 that will close this issue
@dword-design
Copy link
Owner

dword-design commented Aug 19, 2021

nuxt-route-meta supports TypeScript now 🥳. Property decorators will be handled separately.

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

Successfully merging a pull request may close this issue.

3 participants