method missing - Can I get Ruby's method_missing behavior in typescript? -


if class not implement method, want handle error raised , inject own code, using method name.

for example:

class foo {     def method_missing(methodname) {         console.log(`${methodname} called`);     } }  let foo = new foo(); foo.bar(); // should print 'bar called' in console 

in ruby, there method called method_missing on every class provides behavior. can in typescript, , how?

no, typescript cannot this.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -