Overview
The Mirador Web SDK is written in TypeScript and ships with complete type definitions. You get full IntelliSense, type checking, and autocompletion in supported editors.Installation
Types are included in the package - no additional installation needed:Importing Types
Type Definitions
ClientOptions
Configuration for the client:TraceOptions
Configuration for individual traces:ChainName
Supported blockchain networks:TraceEvent
Structure of trace events:TxHashHint
Transaction hash hint structure:ClientMetadata
Browser metadata structure:Type-Safe Usage
Client Initialization
Trace Creation
Chain Names
Generic Attribute Values
Attributes accept multiple types:Strict Mode
The SDK works well with TypeScript strict mode:Handling Nullable Values
getTraceId() returns string | null:
IDE Support
VS Code
Full IntelliSense support out of the box:- Method autocompletion
- Parameter hints
- Type information on hover
- Error highlighting for type mismatches
WebStorm / IntelliJ
Native TypeScript support provides:- Code completion
- Quick documentation
- Type inference
- Refactoring support