1.0.7 • Published 20 days ago

@rolster/types v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
20 days ago

Rolster Types

Package containing the basic definitions for handling data types.

Installation

npm i @rolster/types

Configuration

The package path must be added in the files property in the tsconfig.json file

{
  "files": ["node_modules/@rolster/types/index.d.ts"]
}

Interfaces

NameDescription
Undefined<T>Allows to type a generic data with undefined value.
Nulleable<T>Allows to type a generic data with nulleable value.
Unknown<T>Allows to type a generic data with unknown value.

Implementation

// Variable can contain an string|undefined value
const value1: Undefined<string> = 'string' || undefined;

// Variable can contain an boolean|null value
const value2: Nulleable<boolean> = false || null;

// Variable can contain an number|unknown value
const value3: Unknown<number> = 1044 || unknown;

Contributing

  • Daniel Andrés Castillo Pedroza :rocket:
1.0.7

20 days ago

1.0.6

2 months ago

1.0.5

3 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

8 months ago