Skip to main content

openinference-typescript

TypeScript conventions for any TypeScript code in js/ (packages, examples, tests). Use whenever writing, reviewing, or modifying TypeScript in this repo.

Source facts

Repository
Arize-ai/openinference
Last source activity
October 23, 2026 at 20:54
Detected SKILL.md language
English
Stars
1,299
Forks
374

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
openinference-typescript
description
TypeScript conventions for any TypeScript code in js/ (packages, examples, tests). Use whenever writing, reviewing, or modifying TypeScript in this repo.
# OpenInference TypeScript Conventions Follow existing patterns in the package you're editing (see `js/AGENTS.md`), plus: ## Naming - No single-letter variables, including loop counters (`index`, `span`, `chunk`). - Booleans use verb prefixes: `isStreaming`, `hasError`, `shouldMask`. - Functions start with a verb: `getAttributes`, `parseResponse`, `buildSpanName`. - Extract complex conditions into named booleans. ## Functions - 2+ parameters → a single destructured object, documented with JSDoc `@param params.foo`. - Prefer composition over inheritance, and pure transforms over mutation. - Don't read ambient state (`Date.now()`, config singletons, module constants) deep inside utilities; expose it as an optional param defaulting to a `DEFAULT_*` constant. ## Types - No `any`; use `unknown` and narrow with type guards. If `any` is unavoidable, comment why. - Sparse lookup maps must allow `undefined`: `Partial<Record<K, V>>` (most packages don't enable `noUncheckedIndexedAccess`). ## Reuse Check `@arizeai/openinference-core` and sibling packages for existing utilities before writing helpers or adding dependencies.
View on GitHub