pattern-matching-ts::high_voltage:打字稿中的模式匹配

时间:2021-05-08 08:12:14
【文件属性】:
文件名称:pattern-matching-ts::high_voltage:打字稿中的模式匹配
文件大小:578KB
文件格式:ZIP
更新时间:2021-05-08 08:12:14
typescript functional-programming matching pattern pattern-matching Typescript中的模式匹配。 模式匹配是一种强制性的“如果/其他”条件的声明性功能,它的功能更强大,更冗长。 可以在找到定义“模式匹配测试给定值(或值序列)是否具有由模式定义的形状,如果存在,则将模式中的变量绑定到值(或值序列)的相应组成部分。” 在函数式编程语言中,有用于模式匹配的内置关键字。 虽然Typescript是一种与函数式编程配合得很好的语言,但是缺少此功能。 该软件包旨在通过区分的联合类型/代数数据类型将模式匹配功能引入打字稿中。 指数 MatchW选项 MatchW要么 MatchW默认 执照 安装 纱 yarn add pattern-matching-ts npm npm install --save pattern-matching-ts 用法 火柴 选项匹配 import * as M from 'pattern-matching-ts/lib/m
【文件预览】:
pattern-matching-ts-master
----dtslint()
--------index.d.ts(27B)
----docs()
--------img()
--------_config.yml(241B)
--------index.md(33B)
--------modules()
----tsconfig.build-es6.json(117B)
----img()
--------pattern-matching-ts.png(319KB)
----package.json(2KB)
----perf()
--------match.perf.ts(882B)
----tslint.json(441B)
----.github()
--------workflows()
----test()
--------index.test.ts(791B)
--------match.test.ts(2KB)
--------matchW.test.ts(3KB)
----.prettierrc(91B)
----jest.config.js(434B)
----LICENSE(1KB)
----src()
--------match.ts(5KB)
--------index.ts(112B)
----tsconfig.json(533B)
----.gitignore(76B)
----CHANGELOG.md(51B)
----README.md(7KB)
----yarn.lock(232KB)
----scripts()
--------pre-publish.ts(182B)
--------release.ts(540B)
--------run.ts(404B)
--------LICENSE(1KB)
--------build.ts(2KB)
--------FileSystem.ts(1KB)
----.editorconfig(41B)
----coverage()
--------lcov.info(510B)
--------clover.xml(1KB)
--------coverage-final.json(3KB)
--------.DS_Store(6KB)
--------lcov-report()
----pattern-matching-ts-2.0.0.tar.gz(5KB)
----tsconfig.build.json(107B)

网友评论