node.js - 重载函数 [英] node.js - overloading functions

查看:90
本文介绍了node.js - 重载函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 node.js 中重载类似于 的函数__noSuchMethod__ ?

Is there a way to overload functions in node.js similar to __noSuchMethod__ ?

推荐答案

就像 bxjx 简要提到的那样,Node.js 基于 Google 的 V8 javascript 引擎,这意味着任何语言结构或功能都来自于此.由于它是非标准的,我认为他们不会在不久的将来添加它.此外,我认为 Node 永远不会基于非官方的 V8 分支,但谁知道呢.你仍然可以自己使用那个叉子.

Like bxjx briefly mentioned, Node.js is based on Google's V8 javascript engine, meaning that any language constructs or features come from that. Seeing as it is non-standard, i don't think they will add it in the near future. Also i don't think Node will ever base itself on a non-official V8 fork, but who knows. You can still use that fork yourself.

这篇关于node.js - 重载函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆