Convert a JavaScript Program to Typed TypeScript
The capstone project for TypeScript for Beginners — a free Data & Tech course. Pass it and you earn a certificate anyone can verify.
- Free
- 6 steps
- Pass mark 65%
- Graded within minutes
- Beginner-friendly
The project unlocks once you complete the lessons. The workbook is free to download now so you can see exactly what is expected.
What you will submit
A single public link (GitHub repository or Gist) containing the original JavaScript file (before) and the converted TypeScript file (after) plus tsconfig.json, and a short README that explains the conversion, points to the interface and generic you added, and names at least one bug the types caught. The TypeScript must compile with no errors under 'strict: true'.
What to do, step by step
- Start with a small working JavaScript program (roughly 40–120 lines) — write a fresh one or use an existing one. A cart-total calculator, a simple to-do list, or a fare/VAT/delivery-fee estimator all work well. Keep this original '.js' file intact as your 'before', and confirm it actually runs.
- Rename the file to '.ts' and set up a tsconfig.json (run 'tsc --init') with 'strict: true'. Open the file in VS Code and work through every red underline, fixing the errors top to bottom rather than silencing them with 'any' or '// @ts-ignore'.
- Type every function parameter and variable using the correct basic types (string, number, boolean), arrays ('number[]', etc.) and at least one union type where the data genuinely calls for it (e.g. a status like '"new" | "delivered"'). Note in your README at least one real bug or weak spot the types caught.
- Define at least ONE interface (or type alias) for your program's main data shape — for example 'interface CartItem { name: string; price: number; quantity: number }' — and use it to type the relevant variables and function parameters instead of loose untyped objects.
- Add at least ONE meaningful generic that removes real duplication — for instance 'function first<T>(items: T[]): T { return items[0] }' or a similar reusable helper. Then compile with 'tsc' and confirm it builds with NO type errors under strict mode.
- Push both versions to a public GitHub repository or Gist (the original '.js' and the final '.ts', plus your tsconfig.json), with a short README that explains what you typed, shows the before/after, names your interface and generic, and lists at least one bug the types caught. Submit the public link.
Files to work with
Project workbook (fill in, then submit)The whole brief, an evidence checklist, the grading rubric as a self-check and the link-sharing steps in one file. Opens in Word, Google Docs or WPS.Word · 7 KBHow it is graded
| Criterion | Weight |
|---|---|
| Working conversion — the file is renamed to .ts, compiles with 'tsc' under 'strict: true' with NO type errors, and both the before (.js) and after (.ts) are provided for comparison | 30% |
| Correct typing — function parameters and variables are properly typed with appropriate basic types and arrays, and at least one union type is used sensibly where the data calls for it (with no lazy over-use of 'any') | 25% |
| Interface used well — at least one interface (or type alias) is defined for the main data shape and actually used to type the relevant variables and parameters, replacing loose untyped objects | 20% |
| Generic used meaningfully — at least one generic is written and used to remove genuine duplication or add reusable type safety, not a contrived or unused example | 15% |
| Clarity & realism — the README clearly explains the before/after, names the interface and generic, and lists at least one real bug the types caught; the program is a realistic, sensible piece of code | 10% |
You need 65% overall to pass. A failed submission comes back with feedback and can be revised and resubmitted.
Before you submit: make your link public
If your work lives in Google Drive or Google Docs, open Share → General access and change “Restricted” to “Anyone with the link” (Viewer). Then paste the link into a private browser window: if it opens without sign-in, you are ready. A private link cannot be graded — it is the single most common reason a good project fails.
Frequently asked questions
Do I have to finish TypeScript for Beginners before submitting the project?
Yes. The submission screen opens once every lesson in TypeScript for Beginners is marked complete. The lessons are where the methods, the Nigerian context and the worked examples the project depends on are taught.
How is the project graded?
An examiner scores each rubric criterion from 0 to 100 and weights them as shown on this page; you need 65% overall to pass. Most submissions are graded within minutes and you get written feedback on what was strong and what to improve.
Can I resubmit if I fail?
Yes. A failed project comes back with feedback; revise the weak parts and resubmit. A passed project is final — the certificate is issued and cannot be re-rolled.
What do I actually submit?
A write-up of what you did (under 5,000 characters) plus a public link to your work — a Google Drive folder, Google Doc, spreadsheet, GitHub repository or video. The link must open without sign-in; a private link cannot be graded. The free project workbook on this page walks you through all 6 steps.
Is the certificate real?
Yes. Passing this project issues a certificate with a unique verification code. Anyone — an employer, a client, a school — can open the verification page and see that the certificate is genuine and which project earned it.
More Data & Tech projects
- Sales Dashboard for a Local Business
Data Analysis Foundations
- My Skillnaija Frontend Portfolio
Frontend Web Development
- My First Python Program: 'Kudi Tracker'
Coding Foundations
- Your Junior Technician Field Pack
Data Centre Technician: Racks, Power, Cooling, Cabling and Remote Hands
Ready to earn this certificate?
TypeScript for Beginners is free and self-paced. Finish the lessons, complete this project, and the certificate is yours to share.
Start learning free