GithubHelp home page GithubHelp logo

marocchino / type-challenges Goto Github PK

View Code? Open in Web Editor NEW

This project forked from type-challenges/type-challenges

0.0 1.0 0.0 1004 KB

Collection of TypeScript type challenges with online judge

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

License: MIT License

TypeScript 96.07% Shell 0.12% HTML 2.46% CSS 1.35%

type-challenges's Introduction

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 utility 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 details of the challenges.

1
13・Hello World

10
4・Pick 7・Readonly 11・Tuple to Object 14・First of Array 18・Length of Tuple 43・Exclude 189・Awaited 268・If 533・Concat 898・Includes

30
2・Get Return Type 3・Omit 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・Trim Left 108・Trim 110・Capitalize 116・Replace 119・ReplaceAll 191・Append Argument 296・Permutation 298・Length of String 459・Flatten 527・Append to object 529・Absolute 531・String to Union 599・Merge 610・CamelCase 612・KebabCase 645・Diff 949・AnyOf 1042・IsNever 1097・IsUnion 1130・ReplaceKeys

22
6・Simple Vue 17・Currying 1 55・Union to Intersection 57・Get Required 59・Get Optional 89・Required Keys 90・Optional Keys 112・Capitalize Words 114・CamelCase 147・C-printf Parser 213・Vue Basic Props 223・IsAny 270・Typed Get 300・String to Number 399・Tuple Filter 472・Tuple to Enum Object 545・printf 553・Deep object to unique 651・Length of String 2 730・Union to Tuple 847・String Join 956・DeepPick

12
5・Get Readonly Keys 151・Query String Parser 216・Slice 274・Integers Comparator 462・Currying 2 476・Sum 517・Multiply 697・Tag 734・Inclusive Range 741・Sort 869・DistributeUnions 925・Assert Array Index

By Tags
#application12・Chainable Options 6・Simple Vue 213・Vue Basic Props
#arguments191・Append Argument
#array14・First of Array 533・Concat 898・Includes 15・Last of Array 16・Pop 20・Promise.all 459・Flatten 949・AnyOf 17・Currying 1 216・Slice 734・Inclusive Range 741・Sort 925・Assert Array Index
#built-in4・Pick 7・Readonly 43・Exclude 2・Get Return Type 3・Omit 20・Promise.all
#deep9・Deep Readonly 553・Deep object to unique 956・DeepPick
#infer2・Get Return Type 10・Tuple to Union 55・Union to Intersection 57・Get Required 59・Get Optional 399・Tuple Filter 730・Union to Tuple 734・Inclusive Range 741・Sort
#map62・Type Lookup
#math529・Absolute 274・Integers Comparator 476・Sum 517・Multiply
#object599・Merge 645・Diff
#object-keys7・Readonly 8・Readonly 2 9・Deep Readonly 527・Append to object 5・Get Readonly Keys
#promise189・Awaited
#readonly7・Readonly 8・Readonly 2 9・Deep Readonly
#string531・String to Union
#template-literal106・Trim Left 108・Trim 110・Capitalize 116・Replace 119・ReplaceAll 298・Length of String 529・Absolute 610・CamelCase 612・KebabCase 112・Capitalize Words 114・CamelCase 147・C-printf Parser 270・Typed Get 300・String to Number 472・Tuple to Enum Object 545・printf 651・Length of String 2 151・Query String Parser 274・Integers Comparator 476・Sum 517・Multiply
#this6・Simple Vue
#tuple18・Length of Tuple 10・Tuple to Union 399・Tuple Filter 472・Tuple to Enum Object 730・Union to Tuple
#union4・Pick 3・Omit 10・Tuple to Union 62・Type Lookup 296・Permutation 531・String to Union 1042・IsNever 730・Union to Tuple
#utils268・If 1042・IsNever 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

Recommended Readings

Official

Articles

Projects / Solutions

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

type-challenges's People

Contributors

antfu avatar bencor avatar bluebill1049 avatar bre30kra69cs avatar dqn avatar enicol avatar ericteen avatar federicobozzini avatar g-plane avatar github-actions[bot] avatar greatauk avatar gvergnaud avatar h-a-n-a avatar hiroyaiizuka avatar hubvue avatar johnsoncodehk avatar kawamataryo avatar kynefuk avatar mistlog avatar pashutk avatar sinoon avatar softoika avatar suica avatar turtleflyer avatar uid11 avatar unformalized avatar xianshenglu avatar yu0614 avatar zheeeng avatar zyszys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.