@gitcoin/types
Shared TypeScript types and interfaces for the Gitcoin Core Design System.
Overview
This package contains centralized TypeScript type definitions used across the Gitcoin monorepo to
ensure type consistency between packages and applications.
Structure
.
├── src/
│ ├── button.ts # Button component types
│ └── index.ts # Public type exports
│
├── tsconfig.json # TypeScript configuration
└── tsup.config.ts # Build configuration
Usage
import { ButtonProps, ButtonSize, ButtonVariant } from '@gitcoin/types'
interface MyButtonProps extends ButtonProps {
customProp?: string
}
type Size = ButtonSize
type Variant = ButtonVariant
Available Types
Component Props
ButtonProps
: Props interface for button components
size
: Size variantsvariant
: Style variants- Common button attributes
Common Types
- Size unions
- Variant unions
- Shared utility types
Development
pnpm build
pnpm dev
pnpm lint
Build
This package uses tsup
for building, which provides:
- Type declaration file generation
- Clean builds
- Watch mode
- Tree-shaking
- CommonJS and ESM output
License
AGPL-3.0 - see the LICENSE file for details.