1.0.11 • Published 7 months ago

@npm.piece/types v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Types for fast coding with React

Install

npm i @npm.piece/types -D
yarn add @npm.piece/types -D

Create .d.ts file in src folder and import types

/// <reference types="@npm.piece/types/global" />
/// <reference types="@npm.piece/types/frontend" />
/// <reference types="@npm.piece/types/backend" />

Global Types:

type Nullable<T> = T | null | undefined

type Callback<Value = void | unknown, ReturnType = void> = (
  value: Value
) => ReturnType

type UnknownCallback = (...args: any[]) => any

Frontend Types:

// Function Component
type FC<T = {}> = FunctionComponent<T & ChildrenType>

// Container Component
type CC<T = {}> = () => T

// Service Component
type SC = () => void

type ImportedMF<T = {}> = FC<T & MFPropsType>
1.0.11

7 months ago

1.0.10

8 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago