jruizgit / rules

Durable Rules Engine
MIT License
1.14k stars 209 forks source link

Examples do not compile #357

Closed radiantone closed 3 years ago

radiantone commented 3 years ago

In the Node.js examples there is a reference to an object 'm' that is not defined, thus my typescript/nodejs compiler will not compile the code.

d.ruleset('test', function() { // antecedent whenAll: m.subject == 'World' // consequent run: console.log('Hello ' + m.subject) });

Error:(27, 26) TS2304: Cannot find name 'm'.

radiantone commented 3 years ago

If I declared 'm' in scope as

let m;

it works. But otherwise, it's undeclared.