2.20.11 • Published 5 years ago

@tracksale/interfaces v2.20.11

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Interfaces

The interfaces are able to describe the structures we need to comunicate with our model and all redux modules, such as Store and reducers. They are basically a scheme of how an object should look like.

A interface is composed by the necessary or possible fields of an object. Each field is from one type, such as boolean , number, string for example. To create our interface just follow the steps bellow:

  1. Create a typescript file into src/cdk/interfaces with uour interface name ( For example: "Team.ts" )

  2. Into this file, we will define our interface structure. The interface attributes are arranged in pairs of name and type as follows: name:type. Here's an example fo how to code your interface:

// the '?' key before the attribute name tell for us tha this field is not required.

export interface Team {
  id?: number;
  name: string;
  is_active?: boolean;
  created_at?: number;
  updated_at?: number;
}
  1. After that, you will need to export your interface into the src/cdk/interfaces/index.ts. To do thi, just add an import for everything in your interface file, just like the example:
import * from './Team.ts';
2.20.11

5 years ago

2.20.10

5 years ago

2.20.9

5 years ago

2.20.8

5 years ago

2.20.7

5 years ago

2.20.6

5 years ago

2.20.5

5 years ago

2.20.3

5 years ago

2.20.2

5 years ago

2.20.1

5 years ago

2.20.0

5 years ago

2.19.1

5 years ago

2.19.0

5 years ago

2.18.4-alpha.54

5 years ago

2.18.3

5 years ago

2.18.2

5 years ago

2.18.1

5 years ago

2.18.0

5 years ago

2.17.1

5 years ago

2.17.0

5 years ago

2.16.0

5 years ago

2.15.1

5 years ago

2.15.0

5 years ago

2.14.1

5 years ago

2.14.0

5 years ago

2.13.0

5 years ago

2.12.1

5 years ago

2.12.0

5 years ago

2.11.1

5 years ago

2.11.0

5 years ago

2.10.3

5 years ago

2.10.2

5 years ago

2.10.1

5 years ago

2.10.0

5 years ago

2.9.0

5 years ago

2.8.0

5 years ago

2.7.1

5 years ago

2.7.0

5 years ago

2.6.0

5 years ago

2.5.3

5 years ago

2.5.2

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.3.0

6 years ago

0.3.0-alpha.0

6 years ago

0.2.2-alpha.0

6 years ago

0.2.1-alpha.0

6 years ago

0.2.0-alpha.0

6 years ago

0.1.0-alpha.0

6 years ago

0.0.0

6 years ago