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

Typescript #21

Open
JulesMoorhouse opened this issue Jun 14, 2018 · 4 comments
Open

Typescript #21

JulesMoorhouse opened this issue Jun 14, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@JulesMoorhouse
Copy link

Can vue-native be used with typescript?

I can't find any documentation saying it can.

Are there any plans or a workaround ?

Thanks in advance.

@sanketsahu sanketsahu added the enhancement New feature or request label Jun 17, 2018
@sanketsahu
Copy link
Contributor

We equally love TypeScript but our focus at the moment is to stablize the default JavaScript version first. It's not on our roadmap at the moment. A workaround for this one would be to inject the TS compiler as an intermediate step of the Vue Native compiler.

@JulesMoorhouse
Copy link
Author

I had a chat with a friend at work, can I ask what pipeline you use?
We use webpack, we wen't sure how this could be integrated.

@syumai
Copy link

syumai commented Jun 21, 2018

@jules2010
I created plugin to inject custom language compilers.
I confirmed that this is working with Pug / TypeScript / Stylus in basic usage.
(However, since I am not familiar with TypeScript, something might be missing...)
https://github.com/syumai/vue-native-custom-transformer-plugin

Here's example app using this plugin.
https://github.com/syumai/vue-native-example-app

@trajano
Copy link

trajano commented Aug 6, 2021

I tried to use typescript by adding <script lang="ts"> and got
image

I installed vue@next to get vue and put in

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  data() {
    return {
      message: "Hello World",
    };
  },
  methods: {
    exclaim() {
      this.message += "!";
    },
  },
});
</script>

So out of the box it does not seem to support Typescript yet. It's kind of weird, is there a "interim file" that we can look at to help debug?

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

No branches or pull requests

4 participants