以下是根据我对你的理解生成的技能集(Skills)。
你是一位经验丰富的 TypeScript/JavaScript 开发者、开源作者(koka-ts、remesh-js、farrow-js、react-lite、react-imvc 等),专注于复杂系统架构、领域驱动设计(DDD)、类型系统创新和工程哲学思考。你的风格强调严谨、抽象、可组合性,追求优雅的复杂性管理而非简单化。
我为你生成了以下三个核心技能,严格遵循 agentskills.io/specification 格式:
---以下是根据我对你的理解生成的技能集(Skills)。
你是一位经验丰富的 TypeScript/JavaScript 开发者、开源作者(koka-ts、remesh-js、farrow-js、react-lite、react-imvc 等),专注于复杂系统架构、领域驱动设计(DDD)、类型系统创新和工程哲学思考。你的风格强调严谨、抽象、可组合性,追求优雅的复杂性管理而非简单化。
我为你生成了以下三个核心技能,严格遵循 agentskills.io/specification 格式:
---| type Result<T> = { ok: true; value: T } | { ok: false; error: string }; | |
| const Ok = <T>(value: T): Result<T> => ({ ok: true, value }); | |
| const Fail = (error: string): Result<any> => ({ ok: false, error }); | |
| class Accessor<S, T> { | |
| constructor( | |
| public readonly get: (s: S) => Result<T>, | |
| public readonly set: (t: T, s: S) => Result<S> | |
| ) { } |
| // ============================================================================= | |
| // PART 1: PRIMITIVES (Result & Accessor) | |
| // ============================================================================= | |
| type Result<T> = { ok: true; value: T } | { ok: false; error: string } | |
| const Ok = <T>(value: T): Result<T> => ({ ok: true, value }) | |
| const Err = (error: string): Result<any> => ({ ok: false, error }) | |
| type Getter<Local, Root> = (root: Root) => Result<Local> | |
| type Setter<Local, Root> = (value: Local, root: Root) => Result<Root> |
| type PrimitiveData = string | number | boolean | null | |
| type ListData = LensData[] | |
| type ObjectData = { | |
| [key: string]: LensData | |
| } | |
| type LensData = PrimitiveData | ListData | ObjectData |
| function pipe<A, B>(a: A, f: (a: A) => B): B; | |
| function pipe<A, B, C>(a: A, f: (a: A) => B, g: (b: B) => C): C; | |
| function pipe<A, B, C, D>( | |
| a: A, | |
| f: (a: A) => B, | |
| g: (b: B) => C, | |
| h: (c: C) => D | |
| ): D; | |
| function pipe<A, B, C, D, E>( | |
| a: A, |
| function pipe<A, B>(a: A, f: (a: A) => B): B; | |
| function pipe<A, B, C>(a: A, f: (a: A) => B, g: (b: B) => C): C; | |
| function pipe<A, B, C, D>( | |
| a: A, | |
| f: (a: A) => B, | |
| g: (b: B) => C, | |
| h: (c: C) => D | |
| ): D; | |
| function pipe<A, B, C, D, E>( | |
| a: A, |
| use std::collections::HashMap; | |
| extern crate peg; | |
| #[derive(Debug, Clone, PartialEq, Eq, Hash)] | |
| struct Variable(String); | |
| #[derive(Debug, Clone, PartialEq, Eq, Hash)] | |
| enum Value { | |
| Integer(i32), | |
| Variable(Variable), |
| // library | |
| type Handler<T, R> = [new (...args: any) => T, (input: T) => R]; | |
| type HandlerPattern<T extends Handler<any, any>> = T extends Handler< | |
| infer Pattern, | |
| any | |
| > | |
| ? Pattern | |
| : unknown; |
| type Prettier<T> = { | |
| [key in keyof T]: T[key]; | |
| } | |
| type Tagged<Tag extends string> = { | |
| tag: Tag; | |
| }; | |
| type Field<Key extends string, Value> = { | |
| [key in Key]: Value; |
| domain TodoInputDomain { | |
| state TodoInput = '' | |
| command updateTodoInput(newTodoInput: string) { | |
| return TodoInput.new(newTodoInput) | |
| } | |
| } | |
| type Todo = { |