Category Archives: Typescript

How to configure webpack for replacing your API module path by a Mock API Path

Hi, I’ve been working with React, webpack and TypeScript for almost two years, and it still surprise me when I look for a really custom solution and I end up with a generic solution which will solve my specific problem in a generic way. Today, I am going to write about how to configure webpack Read More →

Dynamic Import Expressions and webpack 2 Code Splitting integration with TypeScript 2.4

Two days ago (27/06/2017), was released TypeScript 2.4.0. Really good news to see that now dynamic import expressions are supported!. Dynamic import expressions are a new feature and part of ECMAScript that allows users to asynchronously request a module at any arbitrary point in your program. TC39 JavaScript committee has it’s own proposal which is Read More →

Part 5. How to consume our decorators, models and parsers from SPFx, the winning combination

This is a blog post in the series about working with Custom Business Objects, Parsers and TypeScript decorators in PnP JS Core: Introduction to Why do we should use Custom Business Objects (Models) in PnP JS Core Creating select and expand TypeScript Property Decorators to be used in PnP JS Core Creating MyDocument and MyDocumentCollection Read More →

Part 4. Create Custom Parser and Array Parser to generate query and property names in PnP JS Core

This is a blog post in the series about working with Custom Business Objects, Parsers and TypeScript decorators in PnP JS Core: Introduction to Why do we should use Custom Business Objects (Models) in PnP JS Core Creating select and expand TypeScript Property Decorators to be used in PnP JS Core Creating MyDocument and MyDocumentCollection Read More →

Part 2. Creating select and expand TypeScript Property Decorators to be used in PnP JS Core

This is a blog post in the series about working with Custom Business Objects, Parsers and TypeScript decorators in PnP JS Core: Introduction to Why do we should use Custom Business Objects (Models) in PnP JS Core Creating select and expand TypeScript Property Decorators to be used in PnP JS Core (this article) Creating MyDocument Read More →

Part 1. Why Should we use Custom Business Objects (Models) in PnP JS Core

This is a blog post in the series about working with Custom Business Objects, Parsers and Decorators in PnP JS Core: Introduction to Why should we use Custom Business Objects (Models) in PnP JS Core (this article) Creating select and expand TypeScript Property Decorators to be used in PnP JS Core Creating MyDocument and MyDocumentCollection Read More →

How to integrate PnP JS Core and SharePoint Framework logging systems

Recently I was playing with PnP JS Core library, which basically is a wrapper of SharePoint Rest API that allows us to easily use it. I discovered some cool Features in this library which I really like them! For example, we are able to easily cache queries, do batches, and the library has a good Read More →

All TypeScript 2.3 options for tsconfig.json (tsc –init)

Yesterday was released TypeScript 2.3 and one of the improvements was an easier startup with better help, richer init, and quicker strictness. It means that TypeScript’s –init output so that potential options are explicitly listed out in comments. As an example, tsconfig.json output will look something like the following: We can see how TypeScript team Read More →

Boilerplate project for React, TypeScript, Webpack 2, postCSS, CSS-Modules and HMR

Hi, Few months ago, I was starting to use WebPack 2 and TypeScript on my React projects. To be fair with ES6 and Babel, I really enjoyed build applications with them and they are in my hearth and that is why I did other post as well, about how to build a new SPA with Read More →

How to Convert Array of Objects into Comma Separated String extracting only one property

Hi, I’d like to share a quick solution which always is really useful when you are handling complex object-type data structures in JavaScript / ES6 / TypeScript. That code will be useful when you want to extract some property values from an array of objects. I will share two versions one for EcmaScript 5 and Read More →