100 lines
No EOL
3.9 KiB
JSON
100 lines
No EOL
3.9 KiB
JSON
{
|
|
"uuid": [
|
|
{
|
|
"value": "64f12aa1-bb09-4c30-902f-0e94ffb936cb"
|
|
}
|
|
],
|
|
"langcode": [
|
|
{
|
|
"value": "en"
|
|
}
|
|
],
|
|
"type": [
|
|
{
|
|
"target_id": "daily_email",
|
|
"target_type": "node_type",
|
|
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
|
|
}
|
|
],
|
|
"revision_timestamp": [
|
|
{
|
|
"value": "2025-05-11T09:00:32+00:00"
|
|
}
|
|
],
|
|
"revision_uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"revision_log": [],
|
|
"status": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"title": [
|
|
{
|
|
"value": "Types or no types\n"
|
|
}
|
|
],
|
|
"created": [
|
|
{
|
|
"value": "2023-09-15T00:00:00+00:00"
|
|
}
|
|
],
|
|
"changed": [
|
|
{
|
|
"value": "2025-05-11T09:00:32+00:00"
|
|
}
|
|
],
|
|
"promote": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"sticky": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"default_langcode": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"revision_translation_affected": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"path": [
|
|
{
|
|
"alias": "\/daily\/2023\/09\/15\/types-or-no-types",
|
|
"langcode": "en"
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"value": "\n <p>Here are two versions of some example code I've recently been working on.<\/p>\n\n<p>One has types and uses TypeScript, the other is JavaScript and has no types.<\/p>\n\n<p>Which do you prefer and why?<\/p>\n\n<h2 id=\"typescript-with-types\">TypeScript (with types)<\/h2>\n\n<pre><code class=\"js\">add(...numbers: number[]): number {\n return numbers.reduce((a: number, b: number) => a + b, 0);\n}\n\nsubtract(...numbers: number[]): number {\n let total = numbers[0];\n\n for (var i = 1, length = numbers.length; i < length; i++) {\n total -= numbers[i];\n }\n return total;\n}\n<\/code><\/pre>\n\n<h2 id=\"javascript-no-types\">JavaScript (no types)<\/h2>\n\n<pre><code class=\"js\">add(...numbers){\n return numbers.reduce((a, b) => a + b, 0);\n}\n\nsubtract(...numbers) {\n let total = numbers[0];\n\n for (var i = 1, length = numbers.length; i < length; i++) {\n total -= numbers[i];\n }\n\n return total;\n}\n<\/code><\/pre>\n\n ",
|
|
"format": "full_html",
|
|
"processed": "\n <p>Here are two versions of some example code I've recently been working on.<\/p>\n\n<p>One has types and uses TypeScript, the other is JavaScript and has no types.<\/p>\n\n<p>Which do you prefer and why?<\/p>\n\n<h2 id=\"typescript-with-types\">TypeScript (with types)<\/h2>\n\n<pre><code class=\"js\">add(...numbers: number[]): number {\n return numbers.reduce((a: number, b: number) => a + b, 0);\n}\n\nsubtract(...numbers: number[]): number {\n let total = numbers[0];\n\n for (var i = 1, length = numbers.length; i < length; i++) {\n total -= numbers[i];\n }\n return total;\n}\n<\/code><\/pre>\n\n<h2 id=\"javascript-no-types\">JavaScript (no types)<\/h2>\n\n<pre><code class=\"js\">add(...numbers){\n return numbers.reduce((a, b) => a + b, 0);\n}\n\nsubtract(...numbers) {\n let total = numbers[0];\n\n for (var i = 1, length = numbers.length; i < length; i++) {\n total -= numbers[i];\n }\n\n return total;\n}\n<\/code><\/pre>\n\n ",
|
|
"summary": null
|
|
}
|
|
],
|
|
"feeds_item": [
|
|
{
|
|
"imported": "1970-01-01T00:32:50+00:00",
|
|
"guid": null,
|
|
"hash": "02563327b263204583e6aa95ad8c9bd2",
|
|
"target_type": "feeds_feed",
|
|
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
|
|
}
|
|
]
|
|
} |