typescript-bindings-patterns

Establish strict TypeScript binding patterns for Rust core components using NAPI-RS with generics and type predicates.

836|66|Updated Feb 3, 2025
One-click install
npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill typescript-bindings-patterns-kreuzberg-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-bindings-patterns
Source: https://github.com/kreuzberg-dev/html-to-markdown/tree/main/.codex/skills/typescript-bindings-patterns
Command: npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill typescript-bindings-patterns-kreuzberg-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidelines and standards for creating TypeScript bindings for a Rust core, ensuring a consistent and high-quality developer experience.

Core Features & Use Cases

  • NAPI-RS Bridge: Focuses on the bridge between Rust and Node.js using NAPI-RS.
  • TypeScript SDK: Develops idiomatic TypeScript SDK packages.
  • Strict Typing: Enforces the strictest TypeScript typing standards, including generics and type predicates.
  • Use Case: Developers integrating a Rust library into a Node.js project can use these patterns to ensure their TypeScript bindings are robust, well-typed, and maintainable.

Quick Start

Follow the TypeScript Strictest Standards outlined in the SKILL.md file for all new bindings.

Frequently Asked Questions about typescript-bindings-patterns

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

FAQPage Schema
How do I create TypeScript bindings for a Rust core using NAPI-RS?

Banning 'any' and 'object' types enforces the strictest TypeScript 5.x standards for NAPI-RS bindings. This prevents type-checking loopholes, ensuring robust, well-typed, and maintainable communication between your Rust core and TypeScript SDK.

Does the typescript-bindings-patterns Skill support generics and type predicates for Rust bridges?

Yes, the typescript-bindings-patterns Skill explicitly supports generics and type predicates for Rust bridges. It enforces these advanced typing features to ensure your NAPI-RS TypeScript SDK packages remain robust and strictly typed.

What is the best way to enforce strict typing standards in a TypeScript SDK for Rust?

The best way to enforce strict typing standards in a TypeScript SDK for Rust is by banning 'any' and 'object' types while adhering to TypeScript 5.x strictest standards. This approach includes specific testing and linting requirements for all new bindings.

Can I use this NAPI-RS pattern to build an idiomatic TypeScript SDK package?

Yes, you can use this NAPI-RS pattern to build an idiomatic TypeScript SDK package. It provides guidelines and standards for creating robust, well-typed bindings that integrate a Rust library into a Node.js project effectively.

What testing and linting requirements are enforced for NAPI-RS TypeScript bindings?

Specific testing and linting requirements are enforced for NAPI-RS TypeScript bindings to maintain high-quality developer experiences. These requirements align with the strictest TypeScript 5.x standards, ensuring robust type safety across the Rust and Node.js bridge.