文件名称:ember-argument-types:动态输入模板参数
文件大小:219KB
文件格式:ZIP
更新时间:2024-05-25 06:13:00
JavaScript
余烬参数类型 运行时类型检查传递给Ember模板的参数。 核心用例是组件,但是此附加组件也可以用于键入从路线或模板中可访问的任何其他对象返回的检查模型。 在幕后, arg-type利用@ember/debug assert来确保生产版本中不会发出任何错误。 兼容性 Ember.js v3.12或更高版本 Ember CLI v2.13或更高版本 Node.js v10或更高版本 安装 ember install ember-argument-types 用法 arg-type helper根据作为第二个参数传递的验证器来处理类型检查参数。 验证器是一种特殊的字符串或用于验证参数的函数。 有关基本和高级用法,请参见下文。 基本验证 基本验证是通过将字符串作为第二个参数传递给arg-type helper来处理的。 {{ arg-type @ myArg " any " }} {{ arg-
【文件预览】:
ember-argument-types-master
----.gitignore(385B)
----README.md(3KB)
----CHANGELOG.md(421B)
----ember-cli-build.js(494B)
----.ember-cli(280B)
----tests()
--------integration()
--------test-helper.js(228B)
--------dummy()
--------unit()
--------helpers()
--------index.html(1KB)
----testem.js(601B)
----app()
--------.gitkeep(0B)
--------helpers()
----package.json(2KB)
----CONTRIBUTING.md(641B)
----vendor()
--------.gitkeep(0B)
----index.js(575B)
----config()
--------ember-try.js(2KB)
--------environment.js(90B)
----LICENSE.md(1KB)
----addon()
---------private()
--------.gitkeep(0B)
--------helpers()
----.watchmanconfig(37B)
----.eslintignore(240B)
----.template-lintrc.js(57B)
----.npmignore(411B)
----.travis.yml(1KB)
----RELEASE.md(2KB)
----.editorconfig(367B)
----lib()
--------arg-type-helper-transform.js(894B)
----.eslintrc.js(1KB)
----package-lock.json(752KB)