stacks-types

Define and reuse TypeScript typings for the Stacks framework.

622|17|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-types
Source: https://github.com/stacksjs/stacks/tree/main/.claude/skills/stacks-types
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the creation and usage of core TypeScript typings for the Stacks framework, reducing duplication and improving type safety across projects.

Core Features & Use Cases

  • Centralized core type definitions and framework type files for storage/framework/types and @stacksjs/types
  • Provides utilities to enforce consistent typings across API, models, and components
  • Use Case: Create or validate type definitions for a new module to ensure API contracts and compile-time safety

Quick Start

Integrate @stacksjs/types into your project and run your usual type-check workflow to validate typings.

Frequently Asked Questions about stacks-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define and reuse core TypeScript typings across Stacks projects?

To define and reuse core TypeScript typings across Stacks projects, integrate the @stacksjs/types package to centralize framework type files and storage types. This reduces type duplication and enforces consistent compile-time safety.

How do I validate type definitions for a new module in the Stacks framework?

To validate type definitions for a new Stacks module, integrate @stacksjs/types and run your usual type-check workflow. The framework relies on auto-generated declarations during builds and advises running typecheck after modifying types.

Does the Stacks typings package support the Bun runtime environment?

Yes, the Stacks typings package fully supports type safety in both Bun and TypeScript environments. It provides framework type files and storage types to ensure consistent typing across APIs, models, and utilities.

Why do I need centralized type definitions for Stacks API and models?

Centralized type definitions are needed for Stacks APIs and models to reduce type duplication and improve type safety across projects. They enforce consistent typings for API contracts and compile-time validation.

What is the best way to enforce consistent typings across Stacks components?

The best way to enforce consistent typings across Stacks components is using the framework's centralized core type definitions. This provides utilities to validate API contracts and ensure components match the required type definitions.