Comments (4)
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.
@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.
@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:
- add the vue-cli plugin https://cli.vuejs.org/core-plugins/typescript.html#vue-cli-plugin-typescript
- convert all .js to .ts
- keep vue component script tags using default lang="js", and then begin switching components over to lang="ts"
- 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. - 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.
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)
- redesign/rebuild our warnings/notifications HOT 1
- Add more docs links
- When there's a filter copy button should copy the filtered text
- Refactor AppView
- Add `make lint/gherkin` to lint-staged
- MeshMultiZoneService GUI
- page highlighting doesn't seem to work HOT 2
- provide a way to navigate from DPP to its Service HOT 1
- Consider adding traffic cards to summary drawers HOT 1
- Copy button for `Addresses` in the MeshService view
- Show warning on the row when MeshService has a hostname conflict HOT 1
- Complete our i18n'ing so we get to 100% i18n'ed text
- Reduce repetition and improve structure of i18n locales files
- Use new Insights field `resources` throughout HOT 1
- Support non-transparent proxy outbounds HOT 2
- ShortcutManager `code` can sometimes be undefined
- meshservice: Enable linking of Outbounds in DataPlaneViz to MeshService detail page HOT 3
- figure out a way to keep openapi/ts up to date automatically
- upgrade eslint to v9
- Use inspect API for DataPlane Viz summary panel policies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kuma-gui.