Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

type-gymnastics

> 编程语言
Open source

Collection of wonderful TypeScript type gymnastics code snippets.

384 stars0 likes1 views
WebsiteGitHub

About

Collection of wonderful TypeScript type gymnastics code snippets.

Overview List

  • Better querySelector by Pig Fang - More intelligent querySelector by parsing your given CSS selector. Also refer to a formal project: typed-query-selector.
  • C-printf Parser by Pig Fang - Parse placeholders like %d and %s for a printf format string.
  • Integers Comparator by Pig Fang - Compare two integers that can be positive or negative or zero.
  • Query String Parser by Pig Fang - Parse URL query string into an object literal type.
  • Spec-compliant HTML Parser by Pig Fang - An HTML parser conforms WHATWG HTML Standard (may not be fully).
  • Tuple Slice by Pig Fang - Array#slice implementation at type level.
  • URL Parser by Pig Fang - Parse a URL into an object literal type with each component of the URL.
  • Pinia by Pig Fang - Type-level function which is similar to Pinia.

View Source Code

All the source code are under src directory.

It's recommended to view them locally with these steps:

  1. Make sure you've installed Git, Node.js and Visual Studio Code.
  2. Clone this repository with Git.
  3. Run npm i or yarn to install TypeScript.
  4. Open this repository in Visual Studio Code.
  5. Enjoy it!

Contributing

Create a new empty directory under src directory and give it a descriptive and short name, then put your source code in it. Also, please consider adding some tests.

Optionally, you can put a readme in that directory to introduce your code in detail.

Last, please update the "Overview List" section of this readme to add a new item for your code with brief.

We assume your code published under MIT License.

Related

  • Type Challenges

License

MIT License

Logo is modified from Picture Day 5 Gymnastics (19 Aug 2010). "Day 5 Gymnastics (19 Aug 2010)" by Singapore 2010 Youth Olympic Games is licensed with CC BY-NC 2.0.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言