metro/react-packager/example_project/foo/foo.js

24 lines
393 B
JavaScript
Raw Normal View History

2015-01-30 01:10:49 +00:00
/**
* @providesModule foo
*/
var bar = require('bar');
class Logger {
log() {
console.log('youll have to change me lol');
}
}
class SecretLogger extends Logger {
log(secret) {
console.log('logging ', secret);
}
}
module.exports = (secret) => {
if (secret !== 'secret') throw new Error('wrong secret');
bar(new SecretLogger().log.bind(SecretLogger, secret), 400);
};