mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-12-16 00:59:05 +00:00
update
This commit is contained in:
30
node_modules/@11ty/eleventy/test/stubs/class-data-fn-shorthand.11ty.js
generated
vendored
Normal file
30
node_modules/@11ty/eleventy/test/stubs/class-data-fn-shorthand.11ty.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
function Test() {}
|
||||
|
||||
// this doesn’t return an object?? 🤡
|
||||
// Test.prototype.data = () => { name: "Ted" };
|
||||
Test.prototype.data = () => {
|
||||
return { name: "Ted" };
|
||||
};
|
||||
Test.prototype.render = ({ name }) => `<p>${name}</p>`;
|
||||
|
||||
/*
|
||||
Test.prototype.data = function() {
|
||||
return { name: "Ted" };
|
||||
};
|
||||
Test.prototype.render = function(data) {
|
||||
return `<p>${data.name}</p>`;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// this isn’t valid syntax?? 🤡
|
||||
class Test {
|
||||
data() => {
|
||||
name: "Ted"
|
||||
};
|
||||
|
||||
render({ name }) => `<p>${name}</p>`;
|
||||
}
|
||||
*/
|
||||
|
||||
module.exports = Test;
|
||||
Reference in New Issue
Block a user