没有合适的资源?快使用搜索试试~ 我知道了~
ts-opaque:易于使用的库,可在TypeScript中实现不透明类型!
共35个文件
ts:15个
json:7个
md:2个
需积分: 9 0 下载量 158 浏览量
2021-04-23
01:15:04
上传
评论
收藏 15KB ZIP 举报
温馨提示
ts不透明 易于使用的库,可在TypeScript中实现! 安装 通过npm安装ts-opaque : $ npm install ts-opaque 动机 TypeScript中的不透明类型是在编译时将其真实结构混淆到编译器的类型。 这些类型可以使您的代码更安全,更安全,更易于重构且速度更快! 尽管Flow具有用于创建不透明类型的opaque关键字,但TypeScript却没有; 这个包是我的解决方案。 用法 import Opaque from "ts-opaque" ; interface User { readonly id : Opaque < number> ; name : string ; } interface Post { readonly id : Opaque < number> ; readonly autho
资源推荐
资源详情
资源评论
收起资源包目录
ts-opaque-latest.zip (35个子文件)
ts-opaque-latest
type-tests
Opaque.test.ts 487B
create.test.ts 324B
BrandType.test.ts 173B
Symbols.test.ts 233B
widen.test.ts 249B
tsconfig.json 110B
BaseType.test.ts 158B
.husky
commit-msg 80B
.gitignore 2B
pre-commit 130B
package.json 2KB
.github
workflows
cd.yml 819B
ci.yml 428B
.prettierignore 99B
tests
create.test.ts 311B
widen.test.ts 344B
tsconfig.json 110B
LICENSE.md 1KB
.gitignore 18B
tsconfig.eslint.json 135B
.npmrc 19B
README.md 3KB
scripts
setup-gpr.js 205B
.editorconfig 147B
.gitattributes 19B
source
Opaque.ts 1KB
widen.ts 833B
BrandType.ts 502B
create.ts 851B
tsconfig.json 115B
BaseType.ts 494B
Symbols.ts 951B
index.ts 227B
.vscode
settings.json 57B
extensions.json 152B
共 35 条
- 1
资源评论
dahiod
- 粉丝: 28
- 资源: 4664
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功