James Xabregas
1 min readOct 20, 2022

If you don’t want to type everything in a Typescript file you can set the noImplicitAny config option to false. This will stop the compiler from complaining about the places where you have missing types.
That said my preference is to use types on function signatures but not always in the internals of a function. For instance it is not generally necessary to type local variables. But if a function can be called from another part of your app then having a typed method signature will provider clearer guidance on what data should be passed into it.
Mind you I think the main thing you are missing is that the value of Typescript comes from defining your own custom types. It’s not uncommon to pass around JS objects with custom properties. Having defined types speeds up coding because you can use your IDE’s auto completion and syntax checking functionality to help you.
Using Typescript also forces you to write code that is easier to understand for other team members and collaborators.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

James Xabregas
James Xabregas

Written by James Xabregas

Manipulating electrons for fun and profit. Thoughts on tech, startups, politics, life. Co-founder of Braiv.co

No responses yet

Write a response