Giter VIP home page Giter VIP logo

Comments (4)

tharun208 avatar tharun208 commented on September 28, 2024 1

Yes, This will be an awesome improvement to make the code bulletproof 💯 . But, I see a practice in some typescript projects is that ppl start defining types with any, So, it will be easier for them to speed up their coding ( we need to avoid that ).

Also, it will be awesome if we even introduce unit testing using https://testing-library.com for components and views.

from kuma-gui.

bartsmykla avatar bartsmykla commented on September 28, 2024

@tharun208 thank you for a great suggestion. I would definitely look for not approving any as a type, also I'm working on introducing unit testing currently :-)

from kuma-gui.

darrenjennings avatar darrenjennings commented on September 28, 2024

@bartsmykla happy to help as we made this switch recently (and as the maintainers of Kongponents, we will of course be migrating it to be v3 compat and eventually TS as well!). My suggestions for your upgrade path:

  1. add the vue-cli plugin https://cli.vuejs.org/core-plugins/typescript.html#vue-cli-plugin-typescript
  1. convert all .js to .ts
  2. keep vue component script tags using default lang="js", and then begin switching components over to lang="ts"
  3. For better or for worse, Vue 2's typescript story is incomplete. However, you can get the type safety you are looking for with the composition api https://github.com/vuejs/composition-api. I would install that and use defineComponent + PropType<T> which has been great.
  4. Take this with a grain of salt, but I would go all in on strict mode if you can. We are not strict at the moment, and it will be painful to switch.

from kuma-gui.

tomaszwylezek avatar tomaszwylezek commented on September 28, 2024

Typescript is slowly being introduced into the app. Probably we are not going to transform most of Vue components to use Typescript before we move to V3.

from kuma-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.