What is Hapening
Hi! Thank you for the great SDK.
While integrating @tcgdex/sdk (v2) in a TypeScript project, I noticed that the Set model is missing the abbreviation property in the type definitions (tcgdex.d.ts), even though the REST API correctly returns it at runtime.
Please explain what should happen
The TypeScript compiler should recognize the abbreviation property, as the raw JSON response properly returns:
{
...
"id": "swsh7",
"name": "Evolving Skies",
"abbreviation": {
"official": "EVS"
}
}
Suggested Fix: Add the abbreviation field to the Set interface in the TypeScript declarations:
interface Set extends Model {
// ... existing fields
abbreviation?: {
official?: string;
};
}
Please give us a way to reproduce
import TCGdex from '@tcgdex/sdk';
const tcgdex = new TCGdex("en");
async function fetchSet() {
const set = await tcgdex.set.get("swsh7");
// TypeScript Error: Property 'abbreviation' does not exist on type 'Set'.
console.log(set.abbreviation?.official);
What is Hapening
Hi! Thank you for the great SDK.
While integrating @tcgdex/sdk (v2) in a TypeScript project, I noticed that the Set model is missing the abbreviation property in the type definitions (tcgdex.d.ts), even though the REST API correctly returns it at runtime.
Please explain what should happen
The TypeScript compiler should recognize the abbreviation property, as the raw JSON response properly returns:
{ ... "id": "swsh7", "name": "Evolving Skies", "abbreviation": { "official": "EVS" } }Suggested Fix: Add the abbreviation field to the Set interface in the TypeScript declarations:
Please give us a way to reproduce