JSPM

@cranberry-money/shared-types

8.21.34
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 49
  • Score
    100M100P100Q99929F
  • License MIT

Shared TypeScript type definitions for Blueberry platform

Package Exports

  • @cranberry-money/shared-types

Readme

@myportfolio/shared-types

Shared TypeScript type definitions for the Blueberry platform, supporting both web (Blueberry) and mobile (Blackberry) applications.

Installation

npm install @myportfolio/shared-types

Usage

import { AuthState, BaseFilters, NavigationItem } from '@myportfolio/shared-types';

// Use shared types in your application
const authState: AuthState = {
  isAuthenticated: true,
  isLoading: false,
  user: {
    hasProfile: true,
    profileCompleted: true,
  },
};

Available Types

Authentication (auth.ts)

  • AuthState - Authentication state management

Components (components.ts)

  • BaseDialogProps - Standard dialog interfaces
  • BaseSearchFieldProps - Search field variations
  • BaseSummaryPanelProps - Summary panel patterns

Instruments (instruments.ts)

  • InstrumentFilters - Filtering for financial instruments
  • InstrumentMetadata - Reference data for instruments
  • NavigationItem - Navigation menu items
  • AppNavigationStructure - Cross-platform navigation structure

Trading Filters (trading-filters.ts)

  • BaseFilters - Base filtering interfaces
  • DateRangeFilters - Date range filtering
  • NumericRangeFilters - Numeric range filtering

Validation (validation.ts)

  • BaseFieldValidation - Form field validation
  • BaseFormValidation - Form-level validation

Development

# Build the package
npm run build

# Watch for changes
npm run dev

# Type check
npm run typecheck

Platform Compatibility

This package is designed to work across:

  • Web applications (React)
  • Mobile applications (React Native)
  • Node.js environments

License

MIT