PHP Traits in TypeScript: 4 Idioms That Replace Them
Gabriel Anhaia
Book: PHP to TypeScript — A Bridge for Modern PHP 8+ Developers Also by me: The TypeScript Library — the 5-book collection My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub A PHP developer opens a TypeScript codebase, finds three classes that all need a timestamps() behaviour, types trait , and gets a red squiggle. There is no such keyword. There never was. The PHP reflex says I will pull the methods into a base
