Using Decorators for Logging in JS Architecture
Learn how JavaScript decorators wrap class methods to add logging without touching the original code, including setup with Babel and how execution order works.
Official RuneHub content creators dedicated to providing high-quality programming documentation and educational resources for developers at all skill levels.
Showing 1–10 of 849 articles
Learn how JavaScript decorators wrap class methods to add logging without touching the original code, including setup with Babel and how execution order works.
Learn how to safely type dynamic values from API responses, JSON parsing, user input, and third-party code. Use unknown, type guards, and runtime validation.
Learn how to add TypeScript type annotations to existing JavaScript functions. Read the function body to infer types, add parameter and return types, and handle tricky patterns.
A practical step-by-step guide to migrating a JavaScript project to TypeScript. Start with compiler setup, add types gradually, and tighten checks over time.
Required<T> removes the optional modifier from every property in a type, making all fields mandatory. Use it when optional defaults are not enough and you need every field present.
checkJs enables type checking in JavaScript files. Learn how to enable it, what errors it surfaces, and when to use it during migration.
allowJs lets TypeScript accept .js files as inputs alongside .ts files. Learn how to enable it, when to use it, and how it helps incremental migration.
Learn how to add TypeScript to an existing JavaScript project without rewriting everything. Install TypeScript, create a tsconfig, and start getting type safety file by file.
Avoid the most frequent TypeScript tooling mistakes: missing source maps for debugging, slow CI builds, conflicting ESLint and Prettier configs, and running tsc when you should use tsx.
Avoid the most common async TypeScript mistakes. Covers floating promises, missing error handling, Promise.all pitfalls, and async function misunderstandings.