Open in app

Sign In

Write

Sign In

Ivan Spoljaric
Ivan Spoljaric

145 Followers

Home

About

Feb 21

3 TypeScript patterns that I use in my day-to-day work

On readonly properties, type guards and unions — 1. Readonly properties In TypeScript 2.0, the readonly modifier was added to the language. Properties marked with readonly can only be assigned during initialization or from within a constructor of the same class. All other assignments are disallowed. Example // type definitions interface Person { readonly name: string; readonly age: number; }; // or type Person…

JavaScript

5 min read

3 TypeScript patterns that I use in my day-to-day work
3 TypeScript patterns that I use in my day-to-day work
JavaScript

5 min read


Sep 29, 2021

How to unit test Vuex modules defined with the vuex-module-decorators syntax in Nuxt, using vue-test-utils and Jest?

The problem To find the answer to my question I went through the official Nuxt documentation and through the existing Stack Overflow and Github issue discussions. But with no luck. My AuthModule looks something like this: The solution After some trial and error I finally discovered the answer to my question. The implementation…

JavaScript

2 min read

How to unit test Vuex modules defined with the vuex-module-decorators syntax in Nuxt, using…
How to unit test Vuex modules defined with the vuex-module-decorators syntax in Nuxt, using…
JavaScript

2 min read


Published in Dev Genius

·Jun 5, 2020

An Introduction to Functional Programming with JavaScript — part 1

On Pure Functions, Referential Transparency and Equational Reasoning — I am currently learning about functional programming (FP) with JavaScript (JS). So I decided to write about my discoveries in order to improve my understanding of the subject and to help someone on a similar path. Even though always investigate relevant sources and try to fact check every claim in…

JavaScript

5 min read

An Introduction to Functional Programming with Javascript — part 1
An Introduction to Functional Programming with Javascript — part 1
JavaScript

5 min read

Ivan Spoljaric

Ivan Spoljaric

145 Followers

Software Developer | Freelancer @ Toptal | Remote Worker | Lifelong Learner

Following
  • George J. Ziogas

    George J. Ziogas

  • Jo Ann Harris

    Jo Ann Harris

  • Bennett Garner

    Bennett Garner

  • inVerita

    inVerita

  • J.J. Pryor

    J.J. Pryor

See all (445)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech