The 12th man comes in for the side that's already eleven strong.
Bonus content is reserved for cricketers who've played every over. A few are still to face.
Still to face
Bonus · 12th Man
Real IPL data modelling.
The 12th man comes in for the big innings. You've learned eleven concepts — here they all are, in one real match.
The eleven lessons used toy data — one batter, a tiny lineup, a single delivery. The shape of real IPL data is bigger. A T20 match has 240 balls, two innings, ten players a side, and a hundred edge cases. But it's modelled with the same eleven concepts you already know.
Below is a real-shape T20 match — its scorecard, the raw delivery data, and the TypeScript that models it from the top down. On the right of each TS line is a tag telling you which lesson that concept came from.
1. The match.
A T20 evening at Eden Gardens. CricketScript XI batting first against the Mumbai Tigers. The data is fictional; the shape mirrors what Cricsheet and ESPNCricinfo actually publish.
2. The data.
The match arrives as JSON — one record per delivery, plus headers for the match itself. Here's the third over: Mehta to Sharma and Iyer, ending in a caught dismissal.
{
"match": {
"format": "T20",
"date": "2026-04-13",
"venue": "Eden Gardens, Kolkata",
"teams": ["CricketScript XI", "Mumbai Tigers"]
},
"innings": [{
"team": "CricketScript XI",
"over": 3,
"deliveries": [
{ "ball":1, "bowler":"Mehta", "batter":"Sharma", "runs":1 },
{ "ball":2, "bowler":"Mehta", "batter":"Iyer", "runs":4 },
{ "ball":3, "bowler":"Mehta", "batter":"Iyer", "runs":0 },
{ "ball":4, "bowler":"Mehta", "batter":"Iyer", "runs":1 },
{ "ball":5, "bowler":"Mehta", "batter":"Sharma", "runs":6 },
{ "ball":6, "bowler":"Mehta", "batter":"Sharma", "runs":0,
"dismissal": { "kind":"Caught", "fielder":"Verma" } }
]
}]
}
3. The types.
And now the TypeScript that models it. Read top-to-bottom. Each tag on the right tells you which lesson that line came from.
You've used every tool.
From a primitive string for the venue all the way up to a generic Innings<T> for the format-aware innings, you've now read a production-grade TypeScript model — using only the eleven concepts you learned in the course.
Real-world IPL data shapes are almost identical to this. Cricsheet's public JSON, ESPNCricinfo's match feeds, the IPL's own API — all of them are versions of this. You're ready to write code against any of them.
The 12th man can step in for any spot. Your eleven concepts can model any data shape that comes their way.