arithmetic4:类型安全的咖喱算术函数

时间:2021-04-11 15:52:23
【文件属性】:
文件名称:arithmetic4:类型安全的咖喱算术函数
文件大小:314KB
文件格式:ZIP
更新时间:2021-04-11 15:52:23
typescript functional arithmetic curry TypeScript 算术4 类型安全的咖喱算术函数 特征 提供ESM和UMD模块 纯文字打字机 超薄尺寸 咖喱 安装 npm i arithmetic4 or yarn add arithmetic4 原料药 类型 type Curried < T> = T extends undefined ? ( b : number ) => number : T extends number ? number : never 添加 将两个值相加。 类型 declare const add : < T xss=removed> ( a : number , b ?: T | undefined ) => Curried < T> 例子 import { add } from 'arithmetic4' add ( 1 , 2 )
【文件预览】:
arithmetic4-main
----.gitignore(2KB)
----.czrc(10KB)
----tsconfig.json(681B)
----README.md(3KB)
----CHANGELOG.md(786B)
----.github()
--------workflows()
--------dependabot.yml(106B)
--------ISSUE_TEMPLATE()
----jest.config.json(272B)
----rollup.config.ts(472B)
----test()
--------add.spec.ts(398B)
--------substract.spec.ts(436B)
--------tsconfig.json(117B)
--------divide.spec.ts(436B)
--------utils.spec.ts(325B)
--------multiply.spec.ts(425B)
----.prettierrc(87B)
----commitlint.config.js(2KB)
----.vscode()
--------settings.json(152B)
----docs()
--------guide()
--------public()
--------.vitepress()
--------index.md(478B)
----LICENSE(1KB)
----.eslintrc(550B)
----.gitattributes(50B)
----SECURITY.md(619B)
----.releaserc.json(744B)
----package.json(2KB)
----src()
--------types.ts(113B)
--------divide.ts(602B)
--------substract.ts(638B)
--------utils.ts(95B)
--------add.ts(560B)
--------index.ts(102B)
--------multiply.ts(609B)
----.husky()
--------.gitignore(2B)
--------commit-msg(78B)
----.editorconfig(207B)
----yarn.lock(406KB)

网友评论