Reader small image

You're reading from  TypeScript 4 Design Patterns and Best Practices

Product typeBook
Published inSep 2021
Reading LevelIntermediate
PublisherPackt
ISBN-139781800563421
Edition1st Edition
Right arrow
Author (1)
 Theofanis Despoudis
Theofanis Despoudis
author image
Theofanis Despoudis

Theo Despoudis lives in Ireland, where he works as a Software Engineer for WP Engine and as a part-time tech practitioner for Fixate. He is the co-author of The React Workshop and Advanced Go Programming in 7 Days, Dzone Core Member, and maintains some open source projects on GitHub. Theo is available for conference talks, independent consulting, and corporate training services opportunities.
Read more about Theofanis Despoudis

Right arrow

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "For example, the client would not need to add another service object with an ApiServiceV2 type."

A block of code is set as follows:

export class EventCreator implements EventSender {
  sendEvent(action: string): void {
    console.log("Event Created: ", action);
  }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

export class Client {
  actionCreator: ActionSender;
  call() {
    this.actionCreator = new ActionCreator();
    this.actionCreator.sendAction("Hello");
    this.actionCreator = new EventAdapter();
    this.actionCreator.sendAction("Another Action");
  }
}

Any command-line input or output is written as follows:

Property 'name' has no initializer and is not definitely assigned in the constructor.ts(2564)
Property 'id has no initializer and is not definitely assigned in the constructor.ts(2564)

Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "Once installed, you want to open the book projects folder using the following menu dialog: File | Open | (Project)."

Tips or important notes

Appear like this.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
TypeScript 4 Design Patterns and Best Practices
Published in: Sep 2021Publisher: PacktISBN-13: 9781800563421

Author (1)

author image
Theofanis Despoudis

Theo Despoudis lives in Ireland, where he works as a Software Engineer for WP Engine and as a part-time tech practitioner for Fixate. He is the co-author of The React Workshop and Advanced Go Programming in 7 Days, Dzone Core Member, and maintains some open source projects on GitHub. Theo is available for conference talks, independent consulting, and corporate training services opportunities.
Read more about Theofanis Despoudis