{ "uuid": [ { "value": "d50d17e4-f42c-4296-8f21-5c2cdaea92ed" } ], "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:10+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": "Do you still need TypeScript?" } ], "created": [ { "value": "2024-06-17T00:00:00+00:00" } ], "changed": [ { "value": "2025-05-11T09:00:10+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2024\/06\/17\/do-you-still-need-typescript", "langcode": "en" } ], "body": [ { "value": "\n

There have been many discussions and videos recently asking if people still need to use TypeScript.<\/p>\n\n

There have also been large open-source projects moving from TypeScript back to plain JavaScript.<\/p>\n\n

The popular approach is using JSDoc comments - similar to PHP docblocks - to replicate some of TypeScript's features, such as autocompletion in IDEs and text editors.<\/p>\n\n

The suggested benefits are cleaner code and no build step, making it easier to work with and contribute to the code.<\/p>\n\n

I like using types in PHP and using static analysis tools such as PHPStan so, naturally, I gravitated to TypeScript.<\/p>\n\n

I wrote a custom form with TypeScript and Vue.js that was an entrypoint to a Drupal Commerce application - populating data from Drupal using an API endpoint and determining and creating a cart with the correct items based on the customer's selections.<\/p>\n\n

Whilst doing so, I found TypeScript very beneficial and I'll probably continue to use it in the future.<\/p>\n\n

But, leveraging JSDoc more in situations where I can't use TypeScript, such as writing Tailwind plugins and Stimulus applications, is great to know and to get the best of both.<\/p>\n\n ", "format": "full_html", "processed": "\n

There have been many discussions and videos recently asking if people still need to use TypeScript.<\/p>\n\n

There have also been large open-source projects moving from TypeScript back to plain JavaScript.<\/p>\n\n

The popular approach is using JSDoc comments - similar to PHP docblocks - to replicate some of TypeScript's features, such as autocompletion in IDEs and text editors.<\/p>\n\n

The suggested benefits are cleaner code and no build step, making it easier to work with and contribute to the code.<\/p>\n\n

I like using types in PHP and using static analysis tools such as PHPStan so, naturally, I gravitated to TypeScript.<\/p>\n\n

I wrote a custom form with TypeScript and Vue.js that was an entrypoint to a Drupal Commerce application - populating data from Drupal using an API endpoint and determining and creating a cart with the correct items based on the customer's selections.<\/p>\n\n

Whilst doing so, I found TypeScript very beneficial and I'll probably continue to use it in the future.<\/p>\n\n

But, leveraging JSDoc more in situations where I can't use TypeScript, such as writing Tailwind plugins and Stimulus applications, is great to know and to get the best of both.<\/p>\n\n ", "summary": null } ], "feeds_item": [ { "imported": "1970-01-01T00:33:45+00:00", "guid": null, "hash": "f230560d474c0edb4725863e286d1ae8", "target_type": "feeds_feed", "target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76" } ] }