feat(lib): fn.withArgs

This commit is contained in:
sh0rez 2020-05-13 12:31:07 +02:00
parent 0d8cf83b56
commit 4c6f532e05
No known key found for this signature in database
GPG key ID: 87C71DF9F8181FF1
6 changed files with 199 additions and 127 deletions

View file

@ -51,6 +51,11 @@
withHelp(help):: { 'function'+: {
help: help,
} },
'#withArgs': d.fn('The `withArgs` modifier overrides the arguments of that function', [d.arg('args', d.T.array)]),
withArgs(args):: { 'function'+: {
args: args,
} },
},
'#fn': self.func['#new'] + d.func.withHelp('`fn` is a shorthand for `func.new`'),
@ -83,6 +88,9 @@
array: 'array',
any: 'any',
'null': "null",
nil: self["null"],
func: 'function',
'function': self.func,
},