-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Problem
The TypeScript configuration in tsconfig.json has "declaration": false, which prevents the generation of .d.ts type definition files.
File: tsconfig.json (line 10)
Impact
This configuration makes the SDK difficult to use for TypeScript developers:
- No IntelliSense/Autocomplete: IDEs cannot provide code completion or suggestions when using the SDK
- No Type Checking: Consumers of the SDK get no compile-time type safety
- Poor Developer Experience: Developers must guess the API structure without type hints
- Defeats the Purpose of TypeScript: The SDK is written in TypeScript, but consumers cannot benefit from it
This is a critical issue for any TypeScript library intended to be consumed by other TypeScript projects.
Why This Is Critical
For a cryptography SDK like relayer-sdk:
- Type safety is crucial to prevent security mistakes
- Complex cryptographic APIs require clear type documentation
- Developers need strong IDE support to use the SDK correctly
- Without
.d.tsfiles, the SDK is essentially unusable in TypeScript projects
Suggested Fix
Enable declaration file generation in tsconfig.json:
{
"compilerOptions": {
"declaration": true, // Generate .d.ts files
"declarationMap": true, // Optional: generate source maps for declarations
// ... rest of config
}
}Benefits:
- ✅ Full IDE support with autocomplete and IntelliSense
- ✅ Type-safe usage in TypeScript projects
- ✅ Better documentation through type definitions
- ✅ Reduced errors when using the SDK
- ✅ Industry standard for TypeScript libraries
Context
This issue was identified as part of a comprehensive configuration audit of the relayer-sdk.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels