没有合适的资源?快使用搜索试试~ 我知道了~
matchbook-ts:javascript和打字稿中的模式匹配变得容易
共80个文件
ts:57个
png:8个
json:5个
需积分: 5 0 下载量 60 浏览量
2021-05-17
05:08:58
上传
评论
收藏 3.63MB ZIP 举报
温馨提示
:fire: 火柴盒 打字稿和javascript中的模式匹配变得容易 matchbook是一个轻量级且易于使用的模式匹配库,用于TypeScript和JavaScript。 如果您想了解更多关于火柴盒的信息,或继续! 如果您想开始使用火柴盒,请像其他npm软件包一样安装它: npm i @matchbook/ts 徽章 npm 代码 其他 目录 火柴簿为您做什么 你可以为火柴做些什么 模式匹配说明 火柴盒一目了然 火柴盒稍长一眼(示例) 接通对象的一部分 开启一个enum 根据事件的类型 如果值是构造函数的instanceof则匹配 火柴簿为您做什么 (列表没有特定的顺序) 富有表现力-模式匹配可帮助您编写更少的代码,比if / else树更具表现力 简单-API只是5个函数,1个错误类和一些核心函数的样式别名 Typescript支持的强大类型推断 有据可查-在这里查看文档!
资源推荐
资源详情
资源评论
收起资源包目录
matchbook-ts-master.zip (80个子文件)
matchbook-ts-master
.gitignore 52B
tsconfig.json 192B
README.md 5KB
test
functions
strike.test.ts 967B
otherwise.test.ts 1KB
e2e
coins
types.ts 411B
coins.test.ts 2KB
events
types.ts 741B
events.test.ts 2KB
person
types.ts 646B
person.test.ts 1KB
catchphrase
types.ts 171B
catchphrase.test.ts 1004B
internal
match-tracking
type-guards.test.ts 1KB
constructors.test.ts 688B
types.test.ts 357B
types
type-guards.test.ts 2KB
match-testing
match-ctor-tester.test.ts 2KB
match-fn-tester.test.ts 3KB
match-value-tester.test.ts 2KB
match-execution
map-unmatched.test.ts 917B
LICENSE 1KB
package.json 2KB
src
public
otherwise.ts 1KB
strike.ts 1KB
index.ts 163B
match.ts 4KB
index.ts 26B
internal
overloads
strike.ts 15KB
match-tracking
constructors.ts 803B
index.ts 171B
types
tracked-either.ts 362B
match-state.ts 298B
matched.ts 356B
index.ts 204B
unmatched.ts 368B
type-guards.ts 597B
common
index.ts 139B
types
problem.ts 204B
ctor.ts 198B
map-fn-or-value.ts 218B
index.ts 169B
type-guards.ts 587B
match-testing
match-ctor-tester.ts 780B
match-fn-tester.ts 1KB
match-value-tester.ts 1KB
index.ts 218B
types
match-tester.ts 356B
index.ts 115B
match-execution
map-unmatched.ts 657B
index.ts 141B
types
unwrap-executor.ts 516B
default-executor.ts 606B
match-executor.ts 645B
index.ts 185B
any-executor.ts 374B
.npmignore 48B
.travis.yml 470B
.editorconfig 360B
.eslintrc.json 96B
.prettierrc.js 145B
assets
logo.png 65KB
readme-samples
file-hash-map.json 340B
static
enum.snippet.png 596KB
ctor.snippet.png 834KB
type_guard.snippet.png 921KB
10-000-feet.snippet.png 415KB
structure.snippet.png 854KB
abc_123.snippet.png 323KB
src
type_guard.snippet.ts 777B
enum.snippet.ts 329B
structure.snippet.ts 631B
ctor.snippet.ts 585B
abc_123.snippet.ts 98B
.editorconfig 33B
10-000-feet.snippet.ts 182B
gen-screenshots.js 2KB
logo.ai 379KB
banner.png 46KB
package-lock.json 361KB
共 80 条
- 1
资源评论
租租车国内租车
- 粉丝: 19
- 资源: 4599
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功