Skip to main content

CurateClick

github.com favicon

Framework Typings

一个收录前端框架简化后的类型编程实现的仓库,帮助开发者理解如何实现酷炫的类型推导功能,如泛型、模板字符串类型、条件类型等。

Check out Framework Typings on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

仓库地址:Framework Typings.许多前端框架为了带给开发者极致的开发体验,已经卷得一去不回头,尤其是在类型推导上,它们已经把泛型、模板字符串类型、条件类型等等玩出了花。比如,Prisma 能根据 select 的属性来推导返回值的类型,Hono 能从路由地址解析出参数,Elysia 能把路由地址转化成链式调用...这些神奇的功能都是如何实现的?这个仓库收录了这些框架简化后的类型编程实现,帮助你从实践出发,理解如何实现这些酷炫的类型推导。typescriptimport { request } from './Hono';request('/user/:name/:id', (ctx) => { const name = ctx.param('name'); const id = ctx.param('id');});``````typescriptimport { findUnique } from './Prisma';const result1 = findUnique({ where: { id: 1 }, select: { id: true, email: true },});result1?.id;result1?.email;result1?.name; // x文章列表一览:- 框架中的类型编程:tRPC & Prisma 中的泛型应用- 框架中的类型编程: Hono 中的模板字符串类型编程- 框架中的类型编程:Elysia 中的链式调用与错误处理

Latest Weekly Picks

promptbuilder.cc favicon
Weekly Pick

Generate, optimize, test, and manage AI prompts in one place. Turn an idea into a ready-to-use prompt in seconds.

Prompt Builder
freqz.net favicon
Weekly Pick

Your Personal K-Style Vibe Photo Studio

Freqz
webleadr.com favicon
Weekly Pick

Find and contact web design leads and businesses without websites, like local dentists, effortlessly from any location in just a few clicks.

Webleadr

the art of having something to say

pretty-scale.com favicon
Weekly Pick

How Pretty Are You? Let AI Decide.

Pretty Scale
c2story.com favicon
Weekly Pick

Create Illustrated Stories with AI

C2story

Impromptu Speech Topics & Timer

Seedance 2.0: Multimodal AI video creator. Precisely direct characters and cameras to create production-ready, multi-shot cinematic stories in one click.