Last-Order / type-challenges

Collection of TypeScript type challenges with online judge

Home Page:https://tsch.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collection of TypeScript type challenges
Now supports TypeScript 4.1 🎉


English | 简体中文 | 日本語

Intro

by the power of TypeScript's well-known Turing Completed type system

High quality types can help improving projects' maintainability while avoiding potential bugs.

There are a bunch of awesome type utilities libraries may boosting your works on types, like ts-toolbelt, utility-types, SimplyTyped, etc, which you can already use.

This project is aimed at helping you better understand how the type system works, writing your own utilities, or just having fun with the challenges. We are also trying to form a community that you can ask questions and get answers you have faced in the real world - they may become part of the challenges!

Challenges

Click the following badges to see detail of the challenges.

1
13・Hello World

8
4・Pick<T, K> 7・Readonly<T> 11・Tuple to Object 14・First of Array 18・Length of Tuple 43・Exclude 189・Awaited 268・If

18
2・Get Return Type 3・Omit<T, K> 8・Readonly 2 9・Deep Readonly 10・Tuple to Union 12・Chainable Options 15・Last of Array 16・Pop 20・Promise.all 62・Type Lookup 106・TrimLeft<T> 108・Trim<T> 110・Capitalize<T> 116・Replace 119・ReplaceAll 191・Append Argument 296・Permutation 298・Length of String

14
6・Simple Vue 17・Currying 1 55・Union to Intersection 57・Get Required 59・Get Optional 89・Required Keys 90・Optional Keys 112・CapitalizeWords<T> 114・CamelCase<T> 147・C-printf Parser 213・Vue Basic Props 223・IsAny 270・Typed Get 300・String to Number

4
5・Get Readonly Keys 151・Query String Parser 216・Slice 274・Integers Comparator

By Tags
#4.014・First of Array 15・Last of Array 16・Pop 17・Currying 1
#application12・Chainable Options 6・Simple Vue 213・Vue Basic Props
#arguments191・Append Argument
#array14・First of Array 15・Last of Array 16・Pop 20・Promise.all 17・Currying 1 216・Slice
#built-in4・Pick<T, K> 7・Readonly<T> 43・Exclude 2・Get Return Type 3・Omit<T, K> 20・Promise.all
#deep9・Deep Readonly
#infer2・Get Return Type 10・Tuple to Union 55・Union to Intersection 57・Get Required 59・Get Optional
#map62・Type Lookup
#math274・Integers Comparator
#object-keys7・Readonly<T> 8・Readonly 2 9・Deep Readonly 5・Get Readonly Keys
#promise189・Awaited
#readonly7・Readonly<T> 8・Readonly 2 9・Deep Readonly
#template-literal106・TrimLeft<T> 108・Trim<T> 110・Capitalize<T> 116・Replace 119・ReplaceAll 298・Length of String 112・CapitalizeWords<T> 114・CamelCase<T> 147・C-printf Parser 270・Typed Get 300・String to Number 151・Query String Parser 274・Integers Comparator
#this6・Simple Vue
#tuple18・Length of Tuple 10・Tuple to Union
#union4・Pick<T, K> 3・Omit<T, K> 10・Tuple to Union 62・Type Lookup 296・Permutation
#utils268・If 55・Union to Intersection 57・Get Required 59・Get Optional 89・Required Keys 90・Optional Keys 223・IsAny 270・Typed Get 5・Get Readonly Keys
#vue6・Simple Vue 213・Vue Basic Props

✨ Upcoming challenges

Official

Articles

TODO

How to Contribute

There are several ways you can contribute to this project

  • Share your answers / solutions
  • Propose new challenges
  • Add more test cases to the existing challenges
  • Provide learning resources or ideas of how to solve challenges
  • Share the problems you have faced in realworld projects, regardless you having the solution or not - the community would help you as well.
  • Help with others by discussion in issues
  • Contribute the infra of this project TODOs.md

Just open an issue and choose the cosponsing template. Thanks!

Thanks

This project was born from solving realworld types problem with @hardfist and @MeCKodo. And great thanks to @sinoon who contributed a lot while giving early feedback on this project.

Inspired by

Contributors

License

MIT

About

Collection of TypeScript type challenges with online judge

https://tsch.js.org/

License:MIT License


Languages

Language:TypeScript 93.5%Language:HTML 4.1%Language:CSS 2.3%Language:Shell 0.1%